author | Lars Hjemli <hjemli@gmail.com> | 2010-08-04 01:10:24 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-08-04 01:10:24 (UTC) |
commit | e6c960c7c0f0d2e54b51cc43ef190df3ce52755e (patch) (unidiff) | |
tree | 29b49ca32a3de23b58ef5c2b7e522b607b60f356 | |
parent | 6a8f65bf184d85a0c51ffecca16f48e6f4b1ff12 (diff) | |
parent | 39c2e224d3c55dfa1a7668399897be295be07dc7 (diff) | |
download | cgit-e6c960c7c0f0d2e54b51cc43ef190df3ce52755e.zip cgit-e6c960c7c0f0d2e54b51cc43ef190df3ce52755e.tar.gz cgit-e6c960c7c0f0d2e54b51cc43ef190df3ce52755e.tar.bz2 |
Merge branch 'js/notes'
-rw-r--r-- | cgit.css | 29 | ||||
-rw-r--r-- | cgit.h | 1 | ||||
-rw-r--r-- | ui-commit.c | 15 | ||||
-rw-r--r-- | ui-log.c | 12 |
4 files changed, 57 insertions, 0 deletions
@@ -166,2 +166,13 @@ table.list td.logmsg { | |||
166 | 166 | ||
167 | table.list td.lognotes-label { | ||
168 | text-align:right; | ||
169 | vertical-align:top; | ||
170 | } | ||
171 | |||
172 | table.list td.lognotes { | ||
173 | font-family: monospace; | ||
174 | white-space: pre; | ||
175 | padding: 0em 0.5em 2em 0.5em; | ||
176 | } | ||
177 | |||
167 | table.list td a { | 178 | table.list td a { |
@@ -328,2 +339,20 @@ div.commit-msg { | |||
328 | 339 | ||
340 | div.notes-header { | ||
341 | font-weight: bold; | ||
342 | padding-top: 1.5em; | ||
343 | } | ||
344 | |||
345 | div.notes { | ||
346 | white-space: pre; | ||
347 | font-family: monospace; | ||
348 | border: solid 1px #ee9; | ||
349 | background-color: #ffd; | ||
350 | padding: 0.3em 2em 0.3em 1em; | ||
351 | float: left; | ||
352 | } | ||
353 | |||
354 | div.notes-footer { | ||
355 | clear: left; | ||
356 | } | ||
357 | |||
329 | div.diffstat-header { | 358 | div.diffstat-header { |
@@ -21,2 +21,3 @@ | |||
21 | #include <utf8.h> | 21 | #include <utf8.h> |
22 | #include <notes.h> | ||
22 | 23 | ||
diff --git a/ui-commit.c b/ui-commit.c index a11bc5f..45af450 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -19,2 +19,3 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
19 | struct commit_list *p; | 19 | struct commit_list *p; |
20 | struct strbuf notes = STRBUF_INIT; | ||
20 | unsigned char sha1[20]; | 21 | unsigned char sha1[20]; |
@@ -37,2 +38,4 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
37 | 38 | ||
39 | get_commit_notes(commit, ¬es, PAGE_ENCODING, 0); | ||
40 | |||
38 | load_ref_decorations(DECORATE_FULL_REFS); | 41 | load_ref_decorations(DECORATE_FULL_REFS); |
@@ -122,2 +125,13 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
122 | html("</div>"); | 125 | html("</div>"); |
126 | if (notes.len != 0) { | ||
127 | html("<div class='notes-header'>Notes</div>"); | ||
128 | html("<div class='notes'>"); | ||
129 | if (ctx.repo->commit_filter) | ||
130 | cgit_open_filter(ctx.repo->commit_filter); | ||
131 | html_txt(notes.buf); | ||
132 | if (ctx.repo->commit_filter) | ||
133 | cgit_close_filter(ctx.repo->commit_filter); | ||
134 | html("</div>"); | ||
135 | html("<div class='notes-footer'></div>"); | ||
136 | } | ||
123 | if (parents < 3) { | 137 | if (parents < 3) { |
@@ -129,2 +143,3 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
129 | } | 143 | } |
144 | strbuf_release(¬es); | ||
130 | cgit_free_commitinfo(info); | 145 | cgit_free_commitinfo(info); |
@@ -113,2 +113,5 @@ void print_commit(struct commit *commit) | |||
113 | if (ctx.qry.showmsg) { | 113 | if (ctx.qry.showmsg) { |
114 | struct strbuf notes = STRBUF_INIT; | ||
115 | get_commit_notes(commit, ¬es, PAGE_ENCODING, 0); | ||
116 | |||
114 | if (ctx.repo->enable_log_filecount) { | 117 | if (ctx.repo->enable_log_filecount) { |
@@ -122,2 +125,11 @@ void print_commit(struct commit *commit) | |||
122 | html("</td></tr>\n"); | 125 | html("</td></tr>\n"); |
126 | if (notes.len != 0) { | ||
127 | html("<tr class='nohover'>"); | ||
128 | html("<td class='lognotes-label'>Notes:</td>"); | ||
129 | htmlf("<td colspan='%d' class='lognotes'>", | ||
130 | cols); | ||
131 | html_txt(notes.buf); | ||
132 | html("</td></tr>\n"); | ||
133 | } | ||
134 | strbuf_release(¬es); | ||
123 | } | 135 | } |