Fossil

Diff
Login

Differences From Artifact [475277fbb2]:

To Artifact [7353135aa6]:


59
60
61
62
63
64
65
66
67
68
69
70
71
72








73
74
75
76
77
78
79
80
81
82
83
84
85
86














87
88
89
90
91
92
93
94
95
96
97
98
99
59
60
61
62
63
64
65







66
67
68
69
70
71
72
73














74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99








-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+












-
  if( !g.okSetup ){
    login_needed();
  }
  style_header("Tags List");
  @ <table cellpadding='4px' border='1'><tbody>
  @ <tr><th>Tag name</th><th>Timestamp</th><th>Version</th></tr>
  db_prepare( &st,
	      "select t.tagname, DATETIME(tx.mtime), b.uuid "
	      "FROM tag t, tagxref tx, blob b "
	      "WHERE t.tagid=tx.tagid and tx.rid=b.rid "
	      "AND tx.tagtype != 0 "
	      "ORDER BY tx.mtime DESC"
	      );
  while( SQLITE_ROW == db_step(&st) )
     "SELECT t.tagname, DATETIME(tx.mtime), b.uuid "
     "  FROM tag t, tagxref tx, blob b"
     " WHERE t.tagid=tx.tagid and tx.rid=b.rid"
     "   AND tx.tagtype != 0"
     /* "   AND t.tagname NOT GLOB 'wiki-*'" // Do we want this?? */
     " ORDER BY tx.mtime DESC"
  );
  while( SQLITE_ROW == db_step(&st) ){
  {
	  char const * tagname = db_column_text( &st, 0 );
	  char const * tagtime = db_column_text( &st, 1 );
	  char const * uuid = db_column_text( &st, 2 );
	  const int offset = 10;
	  char shortname[offset+1];
	shortname[offset] = '\0';
	memcpy( shortname, uuid, offset );
	  @ <tr>
	  @ <td><tt>%s(tagname)</tt></td>
	  @ <td align='center'><tt>%s(tagtime)</tt></td>
	  @ <td><tt>
          @ <a href='/vinfo/%s(uuid)'><strong>%s(shortname)</strong>%s(uuid+offset)</a></tt>
	  @ </td></tr>
    char const * tagname = db_column_text( &st, 0 );
    char const * tagtime = db_column_text( &st, 1 );
    char const * uuid = db_column_text( &st, 2 );
    const int offset = 10;
    char shortname[offset+1];
    shortname[offset] = '\0';
    memcpy( shortname, uuid, offset );
    @ <tr>
    @ <td><tt>%s(tagname)</tt></td>
    @ <td align='center'><tt>%s(tagtime)</tt></td>
    @ <td><tt>
    @ <a href='/vinfo/%s(uuid)'>
    @ <strong>%s(shortname)</strong>%s(uuid+offset)</a></tt>
    @ </td></tr>
  }
  db_finalize( &st );
  @ </tbody></table>
  @ <hr/>TODOs include:
  @ <ul>
  @  <li>Page through long tags lists.</li>
  @  <li>Format the timestamp field.</li>
  @  <li>Allow different sorting.</li>
  @  <li>?</li>
  @ </ul>
  style_footer();
}