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 69e22ae..b9aaa0b 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 7d79e29..8f0c559 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 f808b7e..3846525 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 99d3354..0bb0bdd 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;