putting all the commit details into a commit div
authorCillian de Roiste <cillian.deroiste@gmail.com>
Sat, 26 Jan 2008 15:32:44 +0000 (15:32 +0000)
committerCillian de Roiste <cillian.deroiste@gmail.com>
Sat, 26 Jan 2008 15:32:44 +0000 (15:32 +0000)
src/log.c

index de1670c..7d49de9 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -127,7 +127,7 @@ webgit_log_table (struct webgit_query* query, const char* object, int count, int
                         html (
                               html_tag ("div",
                                         html_attr ("id", "commit"),
-                                        html_attr ("class", (row & 1) ? "odd" : "even")
+                                        html_attr ("class", (row & 1) ? "odd" : "even"),
                                         ),
                               html(html_tag ("div",
                                              html_attr ("class", "date")
@@ -146,52 +146,55 @@ webgit_log_table (struct webgit_query* query, const char* object, int count, int
                                                        NULL,
                                                        webgit_object_commit_header_parse (commit)
                                                        )
-                                   )
+                                   ),
+                              if (verbosity > 0)
+                                html (
+                                      html(html_tag ("div",
+                                                     html_attr ("class", "author")
+                                                     ),
+                                           webgit_email_link (
+                                                              webgit_object_commit_author_name_parse (commit),
+                                                              webgit_object_commit_author_email_parse (commit)
+                                                              )
+                                           ),
+                                      html (html_tag ("div",
+                                                      html_attr ("class", "action")
+                                                      ),
+                                            html(
+                                                 "Diff ",
+                                                 " ",
+                                                 webgit_object_link (query,
+                                                                     query->repo,
+                                                                     strlen (query->repo),
+                                                                     webgit_object_commit_tree_parse (commit),
+                                                                     40,
+                                                                     NULL,
+                                                                     NULL,
+                                                                     html ("Tree")
+                                                                     )
+                                                 )
+                                            )
+                                      )
+                                  if (verbosity > 1)
+                              ,
+                                    html (
+                                          html(html_tag ("div",
+                                                         html_attr ("class", "message")
+                                                         ),
+                                               html(html_tag ("pre"),
+                                                    webgit_object_commit_message_parse (commit)
+                                                    )
+                                               )
+                                          )
                               )
                         );
 
-      if (verbosity > 0)
-        html_list_append (table,
-                          html (
-                                html(html_tag ("div",
-                                               html_attr ("class", "author")
-                                               ),
-                                     webgit_email_link (
-                                                        webgit_object_commit_author_name_parse (commit),
-                                                        webgit_object_commit_author_email_parse (commit)
-                                                        )
-                                     ),
-                                html (html_tag ("div",
-                                                html_attr ("class", "action")
-                                                ),
-                                      html(
-                                           "Diff ",
-                                           " ",
-                                           webgit_object_link (query,
-                                                               query->repo,
-                                                               strlen (query->repo),
-                                                               webgit_object_commit_tree_parse (commit),
-                                                               40,
-                                                               NULL,
-                                                               NULL,
-                                                               html ("Tree")
-                                                               )
-                                           )
-                                      )
-                                )
+
+      //        html_list_append (table,
                           );
 
-      if (verbosity > 1)
+
         html_list_append (table,
-                          html (
-                                html(html_tag ("div",
-                                               html_attr ("class", "message")
-                                               ),
-                                     html(html_tag ("pre"),
-                                           webgit_object_commit_message_parse (commit)
-                                          )
-                                     )
-                                )
                           );