renamed 'giturl' option to 'url'
authorChristian Thaeter <ct@pipapo.org>
Tue, 8 Jan 2008 03:22:48 +0000 (04:22 +0100)
committerChristian Thaeter <ct@pipapo.org>
Tue, 8 Jan 2008 03:22:48 +0000 (04:22 +0100)
src/actions.c
src/repo.c
src/repo.h
src/webgit.h

index 69e22ae974f40d7d511911e821566ec3e6f21810..b9aaa0b8d23c99c38e0624989296e3a39944c7ba 100644 (file)
@@ -51,6 +51,7 @@ webgit_main_content_action (struct webgit_query* query)
   html_list_append (table, html(
                           html(html_tag ("tr"),
                                html(html_tag ("th"),"Name"),
+                               html(html_tag ("th"),"Git URL"),
                                html(html_tag ("th"),"Description"),
                                html(html_tag ("th"),"Owner"),
                                html(html_tag ("th"),"Last Change"),
@@ -68,6 +69,12 @@ webgit_main_content_action (struct webgit_query* query)
       html_list_append (table, html (
                                      html_tag ("tr"),
                                      html(html_tag ("td"), webgit_summary_link (query, n, html (n->name))),
+                                     html(html_tag ("td"), n->url ?
+                                          html (
+                                                html_tag ("a", html_attr ("href", n->url)),
+                                                n->url)
+                                          : "N/A"
+                                          ),
                                      html(html_tag ("td"), n->description),
                                      html(html_tag ("td"), n->owner),
                                      html(html_tag ("td"),
index 7d79e293834c0708512b3e842b62a5eb22c05218..8f0c559e0a42c4c0783ea948186f88ec8f899933 100644 (file)
@@ -81,9 +81,9 @@ webgit_description_conf (struct webgit_repo_info* self, const char *value)
 
 
 static void
-webgit_giturl_conf (struct webgit_repo_info* self, const char *value)
+webgit_url_conf (struct webgit_repo_info* self, const char *value)
 {
-  self->giturl = cwa_strndup (value, SIZE_MAX);
+  self->url = cwa_strndup (value, SIZE_MAX);
 }
 
 
@@ -222,7 +222,7 @@ webgit_repoinfo_new (struct webgit_query* query, const char* path)
   self->name = NULL;
   self->owner = NULL;
   self->description = NULL;
-  self->giturl = NULL;
+  self->url = NULL;
   self->readme = NULL;
 
 
@@ -325,7 +325,7 @@ webgit_repoinfo_free (struct webgit_repo_info* self)
 
       free (self->owner);
       free (self->description);
-      free (self->giturl);
+      free (self->url);
       free (self->readme);
 
       free (self->last_commit);
index f808b7efd5eb238b2757ab0905207d658c7e9996..384652549cbf7b582c10c92c70e249fd8c09e290 100644 (file)
 /*
   repo options
 */
-#define WEBGIT_CONFS                                                             \
- WEBGIT_CONF(name, "Set the displayed name for the repository")                  \
- WEBGIT_CONF(description, "Set the short description for the repository")        \
- WEBGIT_CONF(giturl, "Set public access url")                                    \
- WEBGIT_CONF(owner, "Set owner name of the repository")                          \
+#define WEBGIT_CONFS                                                            \
+ WEBGIT_CONF(name, "Set the displayed name for the repository")                 \
+ WEBGIT_CONF(description, "Set the short description for the repository")       \
+ WEBGIT_CONF(url, "Set public access url")                                      \
+ WEBGIT_CONF(owner, "Set owner name of the repository")                         \
  WEBGIT_CONF(readme, "Set a readme.html file to display")
 
 #define WEBGIT_CONF_PREFIX "web."
index 99d3354e614861eea6e0bcb2ba86c6816c73d487..0bb0bddf793211e35782229f7b3e0ae8212b18a9 100644 (file)
@@ -63,7 +63,7 @@ struct webgit_repo_info
   char* name;
   char* owner;
   char* description;
-  char* giturl;
+  char* url;
   char* readme;
 
   char* last_commit;