# HG changeset patch
# User cavaliet
# Date 1372340566 -7200
# Node ID 8f6eef1d1fc86428c85b78d59ea7107cbc9b3aaa
# Parent 6d37a4bd893aa96d4689038f0bc28542d446afcc
collection available in list and mosaic
diff -r 6d37a4bd893a -r 8f6eef1d1fc8 src/egonomy/models.py
--- a/src/egonomy/models.py Thu Jun 27 15:37:29 2013 +0200
+++ b/src/egonomy/models.py Thu Jun 27 15:42:46 2013 +0200
@@ -57,7 +57,7 @@
return self.thesaurus_pertimm.replace("|", ",").split(",")
@property
- def tags(self):
+ def tag_list(self):
# all keywords mots_cles + titre_pertimm+ description_pertimm + thesaurus_pertimmreturn
# merged into one sorted list
moc = self.mots_cles.split(",")
@@ -84,6 +84,10 @@
id = models.CharField(null=False, blank=False, max_length=15, primary_key=True)
metadata = models.ForeignKey(ImageMetadata)
info = models.ForeignKey(ImageInfo, null=True, blank=True)
+
+ @property
+ def tag_list(self):
+ return self.metadata.tag_list
class Fragment(models.Model):
diff -r 6d37a4bd893a -r 8f6eef1d1fc8 src/egonomy/static/egonomy/css/style.css
--- a/src/egonomy/static/egonomy/css/style.css Thu Jun 27 15:37:29 2013 +0200
+++ b/src/egonomy/static/egonomy/css/style.css Thu Jun 27 15:42:46 2013 +0200
@@ -206,7 +206,7 @@
.box-edition h3{color: #777;font-family: 'Lato'; font-size: 14px; margin-bottom: 6px;}
.list-key-search a{ background-image: url(../img/icon-search.png);}
-.list-key-add a{ background-image: url(../img/icon-plus-15.png);}
+.list-key-add a{background-image: url(../img/icons-15.png); background-position: right 6px top -53px !important; }
.list-keywords li{display: inline-block; float: left; margin: 0 8px 8px 0;}
.list-keywords a{color: #7F7F7F; font-family: 'Lato'; font-size: 12px; display: inline-block; height: 28px; line-height: 28px; padding: 0 30px 0 6px;
@@ -270,6 +270,10 @@
height: 110px;
width: 110px;
}
+.square-fragment-177 {
+ height: 177px;
+ width: 177px;
+}
.square-fragment-225 {
height: 225px;
width: 225px;
diff -r 6d37a4bd893a -r 8f6eef1d1fc8 src/egonomy/templates/egonomy_annotate_picture.html
--- a/src/egonomy/templates/egonomy_annotate_picture.html Thu Jun 27 15:37:29 2013 +0200
+++ b/src/egonomy/templates/egonomy_annotate_picture.html Thu Jun 27 15:42:46 2013 +0200
@@ -93,7 +93,7 @@
{% trans "Keywords" %} :
- {% for t in img.metadata.tags %}
+ {% for t in img.metadata.tag_list %}
{% if t != "" %}- {{ t }}
{% endif %}
{% endfor %}
diff -r 6d37a4bd893a -r 8f6eef1d1fc8 src/egonomy/templates/egonomy_create_fragment.html
--- a/src/egonomy/templates/egonomy_create_fragment.html Thu Jun 27 15:37:29 2013 +0200
+++ b/src/egonomy/templates/egonomy_create_fragment.html Thu Jun 27 15:42:46 2013 +0200
@@ -101,7 +101,7 @@
{% trans "Source picture's keywords" %} : |
- {% for t in img.metadata.tags %}
+ {% for t in img.metadata.tag_list %}
{% if t != "" %}- {{ t }}
{% endif %}
{% endfor %}
@@ -145,119 +145,6 @@
{% endblock %}
-{% comment %}
-
-
-
- {% trans "Fragments from this picture" %}
-
-
-
-
-{% endcomment %}
-
{% block js_page %}
diff -r 6d37a4bd893a -r 8f6eef1d1fc8 src/egonomy/templates/egonomy_view_collection.html
--- a/src/egonomy/templates/egonomy_view_collection.html Thu Jun 27 15:37:29 2013 +0200
+++ b/src/egonomy/templates/egonomy_view_collection.html Thu Jun 27 15:42:46 2013 +0200
@@ -3,7 +3,7 @@
{% load i18n %}
{% load thumbnail %}
-{% block title %}{% trans "View a fragment" %}{% endblock %}
+{% block title %}{% trans "View a collection" %}{% endblock %}
{% block popins %}
@@ -83,120 +83,58 @@
{{ col.title }} / par {{ col.author }}
{% if items %}
{% ifequal display "slideshow" %}
{% for item in items %}
- {% ifequal item.content_type.model "fragment" %}
- -
- {% with fragment=item.content_object %}
-
-
-
- {% if col.author == user %} {% endif %}
- {{ fragment.title }}
- {{ fragment.author }}
-
- desc : {{ item.description }} contenttype : {{ item.content_type.model }} object_id : {{ item.object_id }} content_object : {{ item.content_object }}
-
- {% endwith %}
-
- {% else %}
- {% with img=item.content_object %}
- {% with img.info.image_file as image %}
- {% if image %}
- {% if image|is_portrait %}
- -
-
-
- {% thumbnail image "225" format="PNG" crop="center" as im %}
-
- {% empty %}
-
- {% endthumbnail %}
-
- {% else %}
- -
-
-
-
- {% if col.author == user %} {% endif %}
- {{ img.metadata.titre }}
- {{ img.metadata.auteur }}
-
- desc : {{ item.description }} contenttype : {{ item.content_type.model }} object_id : {{ item.object_id }} content_object : {{ item.content_object }}
-
-
- {% else %}
- 
- {% endif %}
- {% endwith %}
- {% endwith %}
- {% endifequal %}
+ {% include 'partial/item_in_collection_list.html' %}
{% endfor %}
{% endifequal %}
+ {% ifequal display "mosaic" %}
+
+
+
+ {% for item in items %}
+ {% for t in item.content_object.tag_list %}
+ {% if t != "" %}
+ -
+ {{ t }}
+
+ {% endif %}
+ {% endfor %}
+ {% endfor %}
+
+
+
+ {% for item in items %}
+ {% include 'partial/item_in_collection_mosaic.html' %}
+ {% endfor %}
+
+
+ {% endifequal %}
{% else %}
|