Fossil

Check-in [80ec9d53]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make the table generated by /test-rename-list sortable.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:80ec9d532c81b58abdc2c059d98886ddf4d43031711cce14dd69f8763cb97409
User & Date: drh 2018-05-05 17:47:21
Context
2018-05-05
19:02
Further enhance the test-rename-list to include a title with the number of renames and the number of associated check-ins. check-in: b6aa2a23 user: drh tags: trunk
17:47
Make the table generated by /test-rename-list sortable. check-in: 80ec9d53 user: drh tags: trunk
17:37
Enhance the /test-rename-list page to show only distinct rename operations by default, with an option to show them all with the all=1 query parameter. check-in: 98fe1d88 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/path.c.

   599    599       db_prepare(&q, "%s", zRenameQuery/*safe-for-%s*/);
   600    600       style_submenu_element("Distinct", "%R/test-rename-list");
   601    601     }else{
   602    602       style_header("List Of Distinct File Name Changes");
   603    603       db_prepare(&q, "%s", zDistinctRenameQuery/*safe-for-%s*/);
   604    604       style_submenu_element("All", "%R/test-rename-list?all");
   605    605     }
   606         -  @ <table border="1" width="100%%">
   607         -  @ <tr><th>Date &amp; Time</th>
          606  +  @ <table class='sortable' data-column-types='tttt' data-init-sort='1'\
          607  +  @  border="1" cellpadding="2" cellspacing="0">
          608  +  @ <thead><tr><th>Date &amp; Time</th>
   608    609     @ <th>Old Name</th>
   609    610     @ <th>New Name</th>
   610         -  @ <th>Check-in</th></tr>
          611  +  @ <th>Check-in</th></tr></thead><tbody>
   611    612     while( db_step(&q)==SQLITE_ROW ){
   612    613       const char *zDate = db_column_text(&q, 0);
   613    614       const char *zOld = db_column_text(&q, 1);
   614    615       const char *zNew = db_column_text(&q, 2);
   615    616       const char *zUuid = db_column_text(&q, 3);
   616    617       @ <tr>
   617    618       @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td>
   618    619       @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
   619    620       @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
   620    621       @ <td>%z(href("%R/info/%!S",zUuid))%S(zUuid)</a></td></tr>
   621    622     }
   622         -  @ </table>
          623  +  @ </tbody></table>
   623    624     db_finalize(&q);
          625  +  style_table_sorter();
   624    626     style_footer();
   625    627   }