Fossil

Diff
Login

Diff

Differences From Artifact [cf6878895c]:

To Artifact [c752776223]:


322
323
324
325
326
327
328
329

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

351
352
353
354
355
356
357
322
323
324
325
326
327
328

329
330
331
332
333
334
335
336
337
338
339
340
341
342

343
344
345
346
347


348
349
350
351
352
353
354
355







-
+













-





-
-
+







@   (SELECT uuid FROM blob WHERE rid=tagxref.rid)
@  FROM tagxref, tag, event
@ WHERE tagxref.tagid=tag.tagid
@   AND tagxref.tagtype>0
@   AND tag.tagname='branch'
@   AND event.objid=tagxref.rid
@ GROUP BY 1
@ ORDER BY %d DESC;
@ ORDER BY 2 DESC;
;

/*
** This is the new-style branch-list page that shows the branch names
** together with their ages (time of last check-in) and whether or not
** they are closed or merged to another branch.
**
** Control jumps to this routine from brlist_page() (the /brlist handler)
** if there are no query parameters.
*/
static void new_brlist_page(void){
  Stmt q;
  double rNow;
  int orderByMtime = P("mtime")!=0;
  login_check_credentials();
  if( !g.perm.Read ){ login_needed(); return; }
  style_header("Branches");
  login_anonymous_available();
  
  assert( orderByMtime==0 || orderByMtime==1 );
  db_prepare(&q, brlistQuery/*works-like:"%d"*/, 2-orderByMtime);
  db_prepare(&q, brlistQuery/*works-like:""*/);
  rNow = db_double(0.0, "SELECT julianday('now')");
  @ <div class="brlist"><table id="branchlisttable">
  @ <thead><tr>
  @ <th>Branch Name</th>
  @ <th>Age</th>
  @ <th>Checkins</th>
  @ <th>Status</th>
379
380
381
382
383
384
385
386

387
388
389
390
391
392
393
377
378
379
380
381
382
383

384
385
386
387
388
389
390
391







-
+







    }else{
      @ <td></td>
    }
    @ </tr>
  }
  @ </tbody></table></div>
  db_finalize(&q);
  output_table_sorting_javascript("branchlisttable","tkktx");
  output_table_sorting_javascript("branchlisttable","tkktx",2);
  style_footer();
}

/*
** WEBPAGE: brlist
** Show a list of branches
** Query parameters: