Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use an ordinary table to display /whistory rather than a timeline, as the timeline comments are not helpful. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
734e1ea7471933eed54699b2ded4239b |
User & Date: | drh 2018-12-12 20:01:47.620 |
Context
2018-12-12
| ||
20:03 | The table in the new /whistory page is not sortable. ... (check-in: 869841cb user: drh tags: trunk) | |
20:01 | Use an ordinary table to display /whistory rather than a timeline, as the timeline comments are not helpful. ... (check-in: 734e1ea7 user: drh tags: trunk) | |
19:31 | Simplification of wiki menus. ... (check-in: 98f5b402 user: drh tags: trunk) | |
Changes
Changes to src/wiki.c.
︙ | ︙ | |||
851 852 853 854 855 856 857 | @ <input type="submit" name="submit" value="Append Your Changes" /> @ <input type="submit" name="cancel" value="Cancel" /> captcha_generate(0); @ </form> style_footer(); } | < < < < < < < < < < < < < < < > | | < < | | > | > > | | > > | | > | > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > | 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 | @ <input type="submit" name="submit" value="Append Your Changes" /> @ <input type="submit" name="cancel" value="Cancel" /> captcha_generate(0); @ </form> style_footer(); } /* ** WEBPAGE: whistory ** URL: /whistory?name=PAGENAME ** ** Additional parameters: ** ** showid Show RID values ** ** Show the complete change history for a single wiki page. */ void whistory_page(void){ Stmt q; const char *zPageName; double rNow; int showRid; login_check_credentials(); if( !g.perm.Hyperlink ){ login_needed(g.anon.Hyperlink); return; } zPageName = PD("name",""); style_header("History Of %s", zPageName); showRid = P("showid")!=0; db_prepare(&q, "SELECT" " event.mtime," " blob.uuid," " coalesce(event.euser,event.user)," " event.objid" " FROM event, blob, tag, tagxref" " WHERE event.type='w' AND blob.rid=event.objid" " AND tag.tagname='wiki-%q'" " AND tagxref.tagid=tag.tagid AND tagxref.srcid=event.objid" " ORDER BY event.mtime DESC", zPageName ); @ <h2>History of <a href="%R/wiki?name=%T(zPageName)">%h(zPageName)</a></h2> @ <div class="brlist"> @ <table class='xsortable' data-column-types='Kttn' data-init-sort='1'> @ <thead><tr> @ <th>Age</th> @ <th>Hash</th> @ <th>User</th> if( showRid ){ @ <th>RID</th> } @ <th> </th> @ </tr></thead><tbody> rNow = db_double(0.0, "SELECT julianday('now')"); while( db_step(&q)==SQLITE_ROW ){ double rMtime = db_column_double(&q, 0); const char *zUuid = db_column_text(&q, 1); const char *zUser = db_column_text(&q, 2); int wrid = db_column_int(&q, 3); sqlite3_int64 iMtime = (sqlite3_int64)(rMtime*86400.0); char *zAge = human_readable_age(rNow - rMtime); @ <tr> @ <td data-sortkey="%016llx(iMtime)">%s(zAge)</td> fossil_free(zAge); @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td> @ <td>%h(zUser)</td> if( showRid ){ @ <td>%z(href("%R/artifact/%S",zUuid))%d(wrid)</a></td> } @ <td>%z(href("%R/wdiff?id=%S",zUuid))diff</a></td> @ </tr> } @ </tbody></table></div> db_finalize(&q); style_table_sorter(); style_footer(); } /* ** WEBPAGE: wdiff ** ** Show the changes to a wiki page. |
︙ | ︙ |