# HG changeset patch
# User cavaliet
# Date 1361813526 -3600
# Node ID 412ab5e76c655267ab2f4ea1cac6666a03275604
# Parent dc6f8802c08a6c16c615560cca1ddc3f912f0390
Clickable tags to easily add tags from rmn and pertimm.
diff -r dc6f8802c08a -r 412ab5e76c65 src/egonomy/models.py
--- a/src/egonomy/models.py Mon Feb 25 17:19:45 2013 +0100
+++ b/src/egonomy/models.py Mon Feb 25 18:32:06 2013 +0100
@@ -39,8 +39,20 @@
thesaurus_pertimm = models.TextField(null=True, blank=True)
@property
- def thesaurus_pertimm_str(self):
- return self.thesaurus_pertimm.replace("|", ",")
+ def mots_cles_list(self):
+ return self.mots_cles.split(",")
+
+ @property
+ def titre_pertimm_list(self):
+ return self.titre_pertimm.split(",")
+
+ @property
+ def description_pertimm_list(self):
+ return self.description_pertimm.split(",")
+
+ @property
+ def thesaurus_pertimm_list(self):
+ return self.thesaurus_pertimm.replace("|", ",").split(",")
class ImageInfo(models.Model):
diff -r dc6f8802c08a -r 412ab5e76c65 src/egonomy/static/egonomy/css/egonomy.css
--- a/src/egonomy/static/egonomy/css/egonomy.css Mon Feb 25 17:19:45 2013 +0100
+++ b/src/egonomy/static/egonomy/css/egonomy.css Mon Feb 25 18:32:06 2013 +0100
@@ -343,7 +343,7 @@
}
/* add tags buttons style */
-.add_tag_btn:hover{
+.clickable:hover{
text-decoration: underline;
cursor: hand; cursor: pointer;
}
diff -r dc6f8802c08a -r 412ab5e76c65 src/egonomy/templates/egonomy_all_fragments.html
--- a/src/egonomy/templates/egonomy_all_fragments.html Mon Feb 25 17:19:45 2013 +0100
+++ b/src/egonomy/templates/egonomy_all_fragments.html Mon Feb 25 18:32:06 2013 +0100
@@ -17,7 +17,7 @@
{% endifequal %}
{% trans "All fragments" %}
{% elif user_fragments %}
-
{% trans "Fragments created by" %} : {{ username }}
+
{% else %}
{% trans "All fragments" %}
diff -r dc6f8802c08a -r 412ab5e76c65 src/egonomy/templates/egonomy_annotate_picture.html
--- a/src/egonomy/templates/egonomy_annotate_picture.html Mon Feb 25 17:19:45 2013 +0100
+++ b/src/egonomy/templates/egonomy_annotate_picture.html Mon Feb 25 18:32:06 2013 +0100
@@ -69,7 +69,7 @@
| {% trans "Pertimm thesaurus" %} : |
- {{ img.metadata.thesaurus_pertimm_str|default:"" }} |
+ {{ img.metadata.thesaurus_pertimm_list|join:","|default:"" }} |
| {% trans "Last fragment created" %} : |
- {% if last_frg %}{{ last_frg.title }}, {{ last_frg.date_saved }} {% trans 'by' %} {{ last_frg.author }}{% endif %} |
+ {% if last_frg %}{{ last_frg.title }}, {{ last_frg.date_saved }} {% trans 'by' %} {{ last_frg.author }}{% endif %} |
diff -r dc6f8802c08a -r 412ab5e76c65 src/egonomy/templates/egonomy_base.html
--- a/src/egonomy/templates/egonomy_base.html Mon Feb 25 17:19:45 2013 +0100
+++ b/src/egonomy/templates/egonomy_base.html Mon Feb 25 18:32:06 2013 +0100
@@ -44,7 +44,7 @@