diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 19:50:36 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 19:50:36 +0200 | 
| commit | 5a594504ba57d79c201497d2ada888bfb7e3ac26 (patch) | |
| tree | 0e6e878cdee7e7dd2b31bdeeb3a8e2ac949c5a95 | |
| parent | 47ccb133a658575a3814d914a1d3be1133aec72d (diff) | |
| download | Ishtar-5a594504ba57d79c201497d2ada888bfb7e3ac26.tar.bz2 Ishtar-5a594504ba57d79c201497d2ada888bfb7e3ac26.zip | |
Improve window images layout by usinf prettyPhoto (refs #1314)
| -rw-r--r-- | archaeological_files/templates/ishtar/sheet_file_pdf.html | 2 | ||||
| -rw-r--r-- | archaeological_finds/models.py | 4 | ||||
| -rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 4 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation_pdf.html | 2 | ||||
| -rw-r--r-- | ishtar_common/static/js/ishtar.js | 1 | ||||
| -rw-r--r-- | ishtar_common/static/media/style.css | 6 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/sheet.html | 2 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/wizard/search.html | 2 | 
8 files changed, 14 insertions, 9 deletions
| diff --git a/archaeological_files/templates/ishtar/sheet_file_pdf.html b/archaeological_files/templates/ishtar/sheet_file_pdf.html index f7535fb35..a63234ccd 100644 --- a/archaeological_files/templates/ishtar/sheet_file_pdf.html +++ b/archaeological_files/templates/ishtar/sheet_file_pdf.html @@ -1,5 +1,5 @@  {% extends "ishtar/sheet_file.html" %} -{% block css_head %} +{% block header %}  <link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />  {% endblock %}  {% block main_head %} diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 8fb18385b..e047e21cf 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -145,10 +145,6 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms):      order = models.IntegerField(_(u"Order"))      label = models.CharField(_(u"ID"), max_length=60)      description = models.TextField(_(u"Description"), blank=True, null=True) -    """ -    image = models.ImageField(upload_to="finds/", blank=True, null=True) -    thumbnail = models.ImageField(upload_to='finds/thumbs/', blank=True, -                                  null=True)"""      material_type = models.ForeignKey(MaterialType,                                verbose_name = _(u"Material type"))      volume = models.FloatField(_(u"Volume (l)"), blank=True, null=True) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 208447905..9111eb409 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -1,13 +1,13 @@  {% extends "ishtar/sheet.html" %}  {% load i18n %} +  {% block content %}  <div class='tool'>{%trans "Export as:"%} <a href='{% url show-find item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-find item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>  <h3>{% trans "Find"%}</h3>  {% if item.image %} -plouf -<img href='{{item.image.url}}' alt="{{image.label}}"/> +<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}"><img src='{{item.thumbnail.url}}'/></a>  {% endif%}  <p><label>{%trans "Name"%}{% trans ":"%}</label> diff --git a/archaeological_operations/templates/ishtar/sheet_operation_pdf.html b/archaeological_operations/templates/ishtar/sheet_operation_pdf.html index ec771459c..f23b0d489 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation_pdf.html +++ b/archaeological_operations/templates/ishtar/sheet_operation_pdf.html @@ -1,5 +1,5 @@  {% extends "ishtar/sheet_operation.html" %} -{% block css_head %} +{% block header %}  <link rel="stylesheet" href="{{STATIC_URL}}/media/style_basic.css" />  {% endblock %}  {% block main_head %} diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index cba6f0044..caa28089c 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -63,6 +63,7 @@ function load_window(url, speed){          success:function(html){              $("#window").append(html);              $("#"+last_window).show(); +            $("a[rel^='prettyPhoto']").prettyPhoto({'social_tools':''});          },          error:function(XMLHttpRequest, textStatus, errorThrows){          } diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index bd406edc5..22f6d1402 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -432,6 +432,12 @@ table.confirm tr.spacer td:last-child{      text-align:center;  } +#window a img{ +    display:block; +    margin-left:auto; +    margin-right:auto; +} +  .dashboard table th{      text-align:left;      padding:0.5em 1em; diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html index ff21f26e9..9ce038ae9 100644 --- a/ishtar_common/templates/ishtar/sheet.html +++ b/ishtar_common/templates/ishtar/sheet.html @@ -6,7 +6,7 @@  <head>      <title>{% block title %}Ishtar{% if APP_NAME %} - {{APP_NAME}}{%endif%}{% endblock %}      </title> -    {% block css_head %} +    {% block header %}      <link rel="stylesheet" href="{{STATIC_URL}}/media/style.css" />      {% endblock %}  </head> diff --git a/ishtar_common/templates/ishtar/wizard/search.html b/ishtar_common/templates/ishtar/wizard/search.html index 53455a7b4..1d43a80c1 100644 --- a/ishtar_common/templates/ishtar/wizard/search.html +++ b/ishtar_common/templates/ishtar/wizard/search.html @@ -2,6 +2,8 @@  {% load i18n range %}  {% block extra_head %}  {{wizard.form.media}} +<link rel="stylesheet" href="{{STATIC_URL}}/js/prettyPhoto/css/prettyPhoto.css" /> +<script language="javascript" type="text/javascript" src="{{STATIC_URL}}/js/prettyPhoto/js/jquery.prettyPhoto.js"></script>  {% endblock %}  {% block content %}  <h2>{{wizard_label}}</h2> | 
