Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add a "View" submenu item on the artifact viewer for files with wiki mimetype. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
0a2a1b4dde3783d17d7421af6646d93e |
| User & Date: | drh 2009-01-28 22:56:59.000 |
Context
|
2009-01-29
| ||
| 02:42 | The "artifact" webpage renders wiki as wiki and html as html but gives submenu items to convert the rendering back to plain text (and hexdump). ... (check-in: c7fe01fe8e user: drh tags: trunk) | |
|
2009-01-28
| ||
| 22:56 | Add a "View" submenu item on the artifact viewer for files with wiki mimetype. ... (check-in: 0a2a1b4dde user: drh tags: trunk) | |
| 22:23 | A a "View" submenu option for the content viewer when the file is HTML. ... (check-in: d4fedbb4ad user: drh tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
1039 1040 1041 1042 1043 1044 1045 |
@ <h2>Content Of:</h2>
@ <blockquote>
blob_zero(&downloadName);
object_description(rid, 0, &downloadName);
style_submenu_element("Download", "Download",
"%s/raw/%T?name=%d", g.zTop, blob_str(&downloadName), rid);
zMime = mimetype_from_name(blob_str(&downloadName));
| > | | | > > > > > > > > > > > > > > > > > | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 |
@ <h2>Content Of:</h2>
@ <blockquote>
blob_zero(&downloadName);
object_description(rid, 0, &downloadName);
style_submenu_element("Download", "Download",
"%s/raw/%T?name=%d", g.zTop, blob_str(&downloadName), rid);
zMime = mimetype_from_name(blob_str(&downloadName));
if( zMime ){
if( strcmp(zMime, "text/html")==0 ){
style_submenu_element("View", "View",
"%s/raw?name=%d&m=text/html", g.zTop, rid);
}else if( strcmp(zMime, "application/x-fossil-wiki")==0 ){
Stmt q;
db_prepare(&q,
"SELECT blob.uuid || '/' || filename.name"
" FROM mlink, filename, blob"
" WHERE mlink.fid=%d"
" AND filename.fnid=mlink.fnid"
" AND filename.name GLOB '*.wiki'"
" AND blob.rid=mlink.mid",
rid
);
if( db_step(&q)==SQLITE_ROW ){
const char *zCI = db_column_text(&q, 0);
style_submenu_element("View", "View", "%s/doc/%s", g.zTop, zCI);
}
db_finalize(&q);
}
}
@ </blockquote>
@ <hr>
@ <blockquote>
content_get(rid, &content);
zMime = mimetype_from_content(&content);
if( zMime==0 ){
|
| ︙ | ︙ |