Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch ben-minorchanges Excluding Merge-Ins
This is equivalent to a diff from 8d703ff956 to 27a4518e13
2011-09-08
| ||
13:02 | Merge fixes and refactoring from symlinks branch. check-in: c05f6afaf2 user: dmitry tags: trunk | |
11:52 | Merge latest trunk into symlinks branch. check-in: 981e5c62e3 user: dmitry tags: symlinks | |
2011-09-07
| ||
08:12 | Make it easier to use Events as quick notes: Display the title just above the text on Event pages. If there's no title in the wiki text, use the comment as a title. Leaf check-in: 27a4518e13 user: ben tags: ben-minorchanges | |
2011-09-06
| ||
20:12 | catch up with trunk. Remove C++ style comments from http_ssl.c. check-in: 0f1c41bc20 user: martin.weber tags: msw-hack | |
13:23 | Close A and LI tags when displaying new and deleted files in timeline. check-in: 8d703ff956 user: dmitry tags: trunk | |
2011-09-04
| ||
01:28 | Update the built-in SQLite to the latest 3.7.8-alpha version that contains the improved merge-sort logic. check-in: 0cf5416002 user: drh tags: trunk | |
Changes to src/event.c.
62 62 char *zUuid; /* UUID corresponding to rid */ 63 63 const char *zEventId; /* Event identifier */ 64 64 char *zETime; /* Time of the event */ 65 65 char *zATime; /* Time the artifact was created */ 66 66 int specRid; /* rid specified by aid= parameter */ 67 67 int prevRid, nextRid; /* Previous or next edits of this event */ 68 68 Manifest *pEvent; /* Parsed event artifact */ 69 + Blob comment; /* Comment shown in timeline */ 69 70 Blob fullbody; /* Complete content of the event body */ 70 71 Blob title; /* Title extracted from the event body */ 72 + int haveTitle; /* Whether a title was extracted */ 71 73 Blob tail; /* Event body that comes after the title */ 72 74 Stmt q1; /* Query to search for the event */ 73 75 int showDetail; /* True to show details */ 74 76 75 77 76 78 /* wiki-read privilege is needed in order to read events. 77 79 */ ................................................................................ 114 116 115 117 /* Extract the event content. 116 118 */ 117 119 pEvent = manifest_get(rid, CFTYPE_EVENT); 118 120 if( pEvent==0 ){ 119 121 fossil_panic("Object #%d is not an event", rid); 120 122 } 123 + blob_init(&comment, pEvent->zComment, -1); 121 124 blob_init(&fullbody, pEvent->zWiki, -1); 122 - if( wiki_find_title(&fullbody, &title, &tail) ){ 125 + haveTitle = wiki_find_title(&fullbody, &title, &tail); 126 + if( haveTitle ){ 123 127 style_header(blob_str(&title)); 124 128 }else{ 125 129 style_header("Event %S", zEventId); 126 130 tail = fullbody; 127 131 } 128 132 if( g.okWrWiki && g.okWrite && nextRid==0 ){ 129 133 style_submenu_element("Edit", "Edit", "%s/eventedit?name=%s", ................................................................................ 158 162 g.zTop, zEventId, zUuid); 159 163 } 160 164 } 161 165 162 166 if( showDetail && g.okHistory ){ 163 167 int i; 164 168 const char *zClr = 0; 165 - Blob comment; 166 169 167 170 zATime = db_text(0, "SELECT datetime(%.17g)", pEvent->rDate); 168 171 @ <p>Event [<a href="%s(g.zTop)/artifact/%s(zUuid)">%S(zUuid)</a>] at 169 172 @ [<a href="%s(g.zTop)/timeline?c=%T(zETime)">%s(zETime)</a>] 170 173 @ entered by user <b>%h(pEvent->zUser)</b> on 171 174 @ [<a href="%s(g.zTop)/timeline?c=%T(zATime)">%s(zATime)</a>]:</p> 172 175 @ <blockquote> ................................................................................ 177 180 } 178 181 if( zClr && zClr[0]==0 ) zClr = 0; 179 182 if( zClr ){ 180 183 @ <div style="background-color: %h(zClr);"> 181 184 }else{ 182 185 @ <div> 183 186 } 184 - blob_init(&comment, pEvent->zComment, -1); 185 - wiki_convert(&comment, 0, WIKI_INLINE); 186 - blob_reset(&comment); 187 + if( haveTitle ){ 188 + /* Don't display comment if it's used as the inline title below */ 189 + wiki_convert(&comment, 0, WIKI_INLINE); 190 + } 187 191 @ </div> 188 192 @ </blockquote><hr /> 189 193 } 190 194 195 + @ <h2> 196 + wiki_convert(haveTitle ? &title : &comment, 0, WIKI_INLINE); 197 + @ </h2> 198 + 191 199 wiki_convert(&tail, 0, 0); 192 200 style_footer(); 193 201 manifest_destroy(pEvent); 194 202 } 195 203 196 204 /* 197 205 ** WEBPAGE: eventedit