[tracker] Add link to upstream original ontology webpage
- From: Ivan Frade <ifrade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Add link to upstream original ontology webpage
- Date: Mon, 16 Nov 2009 11:08:00 +0000 (UTC)
commit c4620de7c922bcadc9ae8dd0a347c3e0e8590a9f
Author: Ivan Frade <ivan frade nokia com>
Date: Sat Nov 14 20:32:45 2009 +0200
Add link to upstream original ontology webpage
utils/services/ttl_html.c | 4 ++--
utils/services/ttl_loader.c | 3 +++
utils/services/ttl_model.h | 1 +
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/utils/services/ttl_html.c b/utils/services/ttl_html.c
index fe262fc..1fe622d 100644
--- a/utils/services/ttl_html.c
+++ b/utils/services/ttl_html.c
@@ -65,9 +65,9 @@ print_html_header (FILE *f, OntologyDescription *desc)
g_fprintf (f,"<h1>%s</h1>\n", desc->title);
g_fprintf (f," <dl>\n");
- g_fprintf (f," <dt>Latest Version</dt><dd>FIXME</dd>\n");
+ g_fprintf (f," <dt>Upstream:</dt><dd><a href=\"%s\">Upstream version</a></dd>\n",
+ (desc->upstream ? desc->upstream : "#"));
g_fprintf (f," <dt></dt>\n");
- g_fprintf (f," <dt>This Version</dt><dd>FIXME</dd>\n");
g_fprintf (f," <dt></dt>\n");
g_fprintf (f," <dt>Authors:</dt>\n");
g_list_foreach (desc->authors, print_author, f);
diff --git a/utils/services/ttl_loader.c b/utils/services/ttl_loader.c
index 3e8676c..8349cb4 100644
--- a/utils/services/ttl_loader.c
+++ b/utils/services/ttl_loader.c
@@ -27,6 +27,7 @@
#define DSC_EDITOR DSC_PREFIX "editor"
#define DSC_CONTRIBUTOR DSC_PREFIX "contributor"
#define DSC_GITLOG DSC_PREFIX "gitlog"
+#define DSC_UPSTREAM DSC_PREFIX "upstream"
#define DSC_BASEURI DSC_PREFIX "baseUrl"
#define DSC_RELPATH DSC_PREFIX "relativePath"
#define DSC_LOCALPREFIX DSC_PREFIX "localPrefix"
@@ -193,6 +194,8 @@ load_description (OntologyDescription *desc,
g_assert (!g_strcmp0 (turtle_object, DSC_ONTOLOGY));
} else if (!g_strcmp0 (turtle_predicate, DSC_TITLE)) {
desc->title = g_strdup (turtle_object);
+ } else if (!g_strcmp0 (turtle_predicate, DSC_UPSTREAM)) {
+ desc->upstream = g_strdup (turtle_object);
} else if (!g_strcmp0 (turtle_predicate, DSC_AUTHOR)) {
desc->authors = g_list_prepend (desc->authors, g_strdup (turtle_object));
} else if (!g_strcmp0 (turtle_predicate, DSC_EDITOR)) {
diff --git a/utils/services/ttl_model.h b/utils/services/ttl_model.h
index 6b49d96..b7c5563 100644
--- a/utils/services/ttl_model.h
+++ b/utils/services/ttl_model.h
@@ -31,6 +31,7 @@ typedef struct {
GList *editors;
GList *contributors;
gchar *gitlog;
+ gchar *upstream;
gchar *baseUrl;
gchar *localPrefix;
gchar *relativePath;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]