From 89a89e9c1dcc072d2d435d57d4eb1761b94099c7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 7 Jul 2016 20:28:33 +0200 Subject: Switch to font-awesome for icons --- .../templates/ishtar/sheet_contextrecord.html | 8 ++--- .../templates/ishtar/sheet_file.html | 2 +- .../ishtar/wizard/file_confirm_wizard.html | 8 ++--- .../templates/ishtar/sheet_operation.html | 6 ++-- .../ishtar/wizard/wizard_adminact_deletion.html | 2 +- ishtar_common/static/media/style.css | 39 +++++++++++++--------- ishtar_common/templates/base.html | 9 ++--- ishtar_common/templates/ishtar/basket_list.html | 2 +- .../ishtar/dashboards/dashboard_main_detail.html | 6 ++-- ishtar_common/templates/ishtar/manage_basket.html | 2 +- ishtar_common/templates/ishtar/merge.html | 2 +- .../templates/ishtar/merge_organization.html | 4 +-- ishtar_common/templates/ishtar/merge_person.html | 4 +-- ishtar_common/templates/ishtar/sheet.html | 4 +-- .../templates/ishtar/sheet_organization.html | 2 +- .../templates/ishtar/wizard/parcels_wizard.html | 2 +- .../templates/ishtar/wizard/towns_wizard.html | 2 +- .../wizard/wizard_organization_deletion.html | 8 ++--- .../ishtar/wizard/wizard_person_deletion.html | 26 +++++++-------- ishtar_common/templatetags/link_to_window.py | 7 ++-- ishtar_common/views.py | 4 +-- 21 files changed, 78 insertions(+), 71 deletions(-) diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index ecd80e36f..4102c01c4 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -25,7 +25,7 @@ {% if item.operation.code_patriarche %}

{% else %} -

+

{%endif%} {{item.full_label}}

@@ -84,7 +84,7 @@ {{ relation.right_record.datings.all|join:", " }}{# periods ?#} {{ relation.right_record.description }} {{ relation.right_record.parcel.section }} - {{relation.right_record.parcel.parcel_number}} - {% trans "Details" %} + {% endfor %} @@ -98,7 +98,7 @@ {% if item.operation.code_patriarche %}

{{ item.operation.code_patriarche }}

-{% else %}

+{% else %}

{%endif%} {#

{{ item.operation.internal_reference }}

#}

@@ -120,7 +120,7 @@

{{ item.operation }}

{# TODO: Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related operation #} -{% else %}

+{% else %}

{% endif %} {% trans "Document from this context record" as cr_docs %} diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 3272e87e3..7a6120e42 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -137,7 +137,7 @@ - + {% empty %} diff --git a/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html b/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html index fd85de473..f5268f582 100644 --- a/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html +++ b/archaeological_files_pdl/templates/ishtar/wizard/file_confirm_wizard.html @@ -5,10 +5,10 @@ {% block "warning_informations" %} {% for file in numeric_reference_files %} {% if forloop.first %} -

+


@@ -16,10 +16,10 @@ {% endfor %} {% for file in similar_files %} {% if forloop.first %} -

+


diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index d1cd1578c..9af7a3e44 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -26,7 +26,7 @@
{% trans "Modify" %}
{% if item.virtual_operation %} -

{% trans "This operation is virtual." %}

+

{% trans "This operation is virtual." %}

{% endif %}

{% trans "General"%}

@@ -35,7 +35,7 @@ {% if item.operation_code %}

{{ item.operation_code }}

{% endif %} {% if item.code_patriarche %}

OA{{ item.code_patriarche }}

{%else%} -

{%trans "Patriarche OA code not yet recorded!"%}

{%endif%} +

{%trans "Patriarche OA code not yet recorded!"%}

{%endif%}

{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}

{{ item.history_creator.ishtaruser.full_label }}

@@ -117,7 +117,7 @@ {% ifchanged rel.relation_type %} {% if forloop.counter0 %}{% endif %}

{{rel.relation_type}}

{% endif %} {% endfor %} {% endif %} diff --git a/archaeological_operations/templates/ishtar/wizard/wizard_adminact_deletion.html b/archaeological_operations/templates/ishtar/wizard/wizard_adminact_deletion.html index 0b44b4ad0..0e47a417c 100644 --- a/archaeological_operations/templates/ishtar/wizard/wizard_adminact_deletion.html +++ b/archaeological_operations/templates/ishtar/wizard/wizard_adminact_deletion.html @@ -3,6 +3,6 @@ {% block "extra_informations" %} {% if current_object.index %} -

+

{% endif %} {% endblock %} diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css index e74a6d205..51b9de79d 100644 --- a/ishtar_common/static/media/style.css +++ b/ishtar_common/static/media/style.css @@ -33,6 +33,9 @@ a.add-button, color:#fff; } +#context_menu { +} + #context_menu .orange { color:#dd6011; } @@ -44,11 +47,12 @@ a.add-button, #context_menu .normal{ color:#000; } +#context_menu .basket{ + font-family: 'FontAwesome', Arial, Helvetica, sans-serif; +} #context_menu option.basket{ color:#000; - font-weight: bold; - font-style: italic; } /* borders */ @@ -94,7 +98,7 @@ div.form { } body{ - font-family:Arial, Helvetica, sans-serif; + font-family: Arial, Helvetica, sans-serif; font-size: 11pt; margin:0; color:#61615C; @@ -242,7 +246,10 @@ div.nav-button{ width:15px; z-index:1000; position:fixed; - right:20px; + right:32px; + font-size: 40px; + background-color: transparent; + border: 0 solid transparent; } #to_bottom_arrow{ @@ -300,12 +307,9 @@ a.button{ .display_details_inline, .display_details{ display:inline-block; - font-size:0; - color:transparent; + font-size:18px; width:18px; height:16px; - background-image:url(images/info.png); - background-repeat:no-repeat; text-decoration:none; vertical-align: bottom; } @@ -747,15 +751,18 @@ table.confirm tr.spacer td:last-child{ .previous_page, .next_page{ position:absolute; - top:1px; + top:40px; + font-size: 30px; + color: #000; + z-index: 1000; } .previous_page{ - left:135px; + left:35px; } .next_page{ - right:135px; + right:35px; } a.photo{ @@ -996,8 +1003,7 @@ p.info-box, p.alert{ display:block; font-style:italic; width:670px; - padding:1em; - padding-left:2em; + padding:1em 0.5em; background-color:#f1f2f6; -moz-border-radius:8px; -webkit-border-radius:8px; @@ -1005,11 +1011,12 @@ p.info-box, p.alert{ font-size: 0.9em; } +p.info-box .fa, p.alert .fa{ + padding-right: 1em; +} + p.alert{ color:#D14; - background-image:url(images/red_flag.png); - background-repeat:no-repeat; - background-position:left center; } div.form p.alert{ diff --git a/ishtar_common/templates/base.html b/ishtar_common/templates/base.html index 8cd3c7793..b325be2fb 100644 --- a/ishtar_common/templates/base.html +++ b/ishtar_common/templates/base.html @@ -20,6 +20,7 @@ + @@ -54,10 +55,10 @@ {% endblock %}
{% with 'show-'|add:model_name as model_url%} - + {% endwith %} {% endfor %} diff --git a/ishtar_common/templates/ishtar/basket_list.html b/ishtar_common/templates/ishtar/basket_list.html index a0a0e5d73..011ed97a0 100644 --- a/ishtar_common/templates/ishtar/basket_list.html +++ b/ishtar_common/templates/ishtar/basket_list.html @@ -1,7 +1,7 @@ {% load i18n %}
{{operation.in_charge|default:""}} {{operation.start_date|default:""}} {{operation.excavation_end_date|default:""}}
{% trans "No operation associated to this archaelogical file" %}
{% trans "Details" %}
{% for item in basket.items.all %} - + {% endfor %}
{% trans 'Details' %} {{item.full_label}} {% trans "remove" %}
diff --git a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html index d7ea16d90..ff6234764 100644 --- a/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html +++ b/ishtar_common/templates/ishtar/dashboards/dashboard_main_detail.html @@ -16,12 +16,12 @@

{% trans "Total:" %} {{dashboard.total_number}}

-

{% trans 'Draw rectangle on the graph to zoom. Double-click to reinitialize.' %}

+

{% trans 'Draw rectangle on the graph to zoom. Double-click to reinitialize.' %}

-

{% trans 'Right-click on this image to save it.' %}

+

{% trans 'Right-click on this image to save it.' %}

@@ -105,7 +105,7 @@ if (typeof values_1_{{unique_id}} === 'undefined' || values_1_{{unique_id}}.length == 0){ $('#chart_img_{{unique_id}}').hide(); -$('#chart_{{unique_id}}').html("

{% trans 'No data for these criteria.' %}

"); +$('#chart_{{unique_id}}').html("

{% trans 'No data for these criteria.' %}

"); } else { var showmarker = false; diff --git a/ishtar_common/templates/ishtar/manage_basket.html b/ishtar_common/templates/ishtar/manage_basket.html index 6332b326e..64793c46d 100644 --- a/ishtar_common/templates/ishtar/manage_basket.html +++ b/ishtar_common/templates/ishtar/manage_basket.html @@ -4,7 +4,7 @@

{{page_name}}{% trans ":"%} {{basket}}

{% csrf_token %}
-

{% trans 'Checking "Select all" only select the current page.' %}

+

{% trans 'Checking "Select all" only select the current page.' %}

{{form}}

{% trans "Basket content" %}

diff --git a/ishtar_common/templates/ishtar/merge.html b/ishtar_common/templates/ishtar/merge.html index edd27a722..0e15da62a 100644 --- a/ishtar_common/templates/ishtar/merge.html +++ b/ishtar_common/templates/ishtar/merge.html @@ -4,7 +4,7 @@ {% block content %}

{% trans "Merge" %}

-

+

{% if previous_page %}{% else %} {% endif %} {% trans "Page " %}{{current_page}}/{{max_page}} {% if next_page %}{% else %} {% endif %}

diff --git a/ishtar_common/templates/ishtar/merge_organization.html b/ishtar_common/templates/ishtar/merge_organization.html index e4ca430a1..87eab7d53 100644 --- a/ishtar_common/templates/ishtar/merge_organization.html +++ b/ishtar_common/templates/ishtar/merge_organization.html @@ -4,14 +4,14 @@ {% if form.non_field_errors %}{% for error in form.non_field_errors %}{{error}} {% endfor%}{% endif %} - Détails + {{form.instance.from_organization}} ({{form.instance.from_organization.pk}})
{{form.instance.from_organization.address_lbl|linebreaksbr}} - Détails + {{form.instance.to_organization}} ({{form.instance.to_organization.pk}})
diff --git a/ishtar_common/templates/ishtar/merge_person.html b/ishtar_common/templates/ishtar/merge_person.html index f677a5cf3..4e76c804b 100644 --- a/ishtar_common/templates/ishtar/merge_person.html +++ b/ishtar_common/templates/ishtar/merge_person.html @@ -4,14 +4,14 @@ {% if form.non_field_errors %}{% for error in form.non_field_errors %}{{error}} {% endfor%}{% endif %} - Détails + {{form.instance.from_person}} ({{form.instance.from_person.pk}})
{{form.instance.from_person.address_lbl|linebreaksbr}} - Détails + {{form.instance.to_person}} ({{form.instance.to_person.pk}})
diff --git a/ishtar_common/templates/ishtar/sheet.html b/ishtar_common/templates/ishtar/sheet.html index 714bfa762..5cb75ea3a 100644 --- a/ishtar_common/templates/ishtar/sheet.html +++ b/ishtar_common/templates/ishtar/sheet.html @@ -18,10 +18,10 @@ diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html index c5f01b96a..8deeebf98 100644 --- a/ishtar_common/templates/ishtar/sheet_organization.html +++ b/ishtar_common/templates/ishtar/sheet_organization.html @@ -32,7 +32,7 @@ {{person.name|default:""}} {{person.surname|default:""}} {% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %} - {% trans "Details" %} + {% empty %} {% trans "No person in this organization" %} diff --git a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html index 5afa69360..e417b5e4d 100644 --- a/ishtar_common/templates/ishtar/wizard/parcels_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/parcels_wizard.html @@ -9,7 +9,7 @@ {{ wizard.form.media }} {{ wizard.management_form }} {{ wizard.form.management_form }} -{% if automatic_parcel_association %}

{% endif %} +{% if automatic_parcel_association %}

{% endif %} {%if wizard.form.non_form_errors%} diff --git a/ishtar_common/templates/ishtar/wizard/towns_wizard.html b/ishtar_common/templates/ishtar/wizard/towns_wizard.html index 4f9ff6c5f..889108f32 100644 --- a/ishtar_common/templates/ishtar/wizard/towns_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/towns_wizard.html @@ -24,7 +24,7 @@
{{wizard.form.non_form_errors}}
{% endif %} {% else %} -

{% trans "No town set in the associated file." %}

+

{% trans "No town set in the associated file." %}

{% endif %} {{ previous_fields|safe }} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html index 6de2fbe8c..c4d765352 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_organization_deletion.html @@ -6,7 +6,7 @@

{% trans "Associated persons" %}

    {% for person in current_object.members.all %} -
  • {{person}} {% trans "show"%}
  • {% endfor %} +
  • {{person}}
  • {% endfor %}
{% endif %} @@ -14,7 +14,7 @@

{% trans "Associated archaeological files" %}

    {% for file in current_object.files.all %} -
  • {{file}} {% trans "show"%}
  • {% endfor %} +
  • {{file}}
  • {% endfor %}
{% endif %} @@ -22,7 +22,7 @@

{% trans "Operator of archaeological operations" %}

    {% for operation in current_object.operator.all %} -
  • {{operation}} {% trans "show"%}
  • {% endfor %} +
  • {{operation}}
  • {% endfor %}
{% endif %} @@ -30,7 +30,7 @@

{% trans "Adminact: operator of archaeological operations" %}

    {% for adminact in current_object.adminact_operator.all %} -
  • {{adminact}} {% trans "show"%}
  • {% endfor %} +
  • {{adminact}}
  • {% endfor %}
{% endif %} diff --git a/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html index ee04fbd84..03b941c60 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_person_deletion.html @@ -6,7 +6,7 @@

{% trans "In charge of archaeological files" %}

    {% for file in current_object.file_responsability.all %} -
  • {{file}} {% trans "show"%}
  • {% endfor %} +
  • {{file}}
  • {% endfor %}
{% endif %} @@ -14,7 +14,7 @@

{% trans "General contractor of archaeological files" %}

    {% for file in current_object.general_contractor.all %} -
  • {{file}} {% trans "show"%}
  • {% endfor %} +
  • {{file}}
  • {% endfor %}
{% endif %} @@ -22,7 +22,7 @@

{% trans "Responsible town planning service of archaeological files" %}

    {% for file in current_object.responsible_town_planning_service.all %} -
  • {{file}} {% trans "show"%}
  • {% endfor %} +
  • {{file}}
  • {% endfor %}
{% endif %} @@ -30,7 +30,7 @@

{% trans "Scientist in charge of archaeological files" %}

    {% for file in current_object.scientist.all %} -
  • {{file}} {% trans "show"%}
  • {% endfor %} +
  • {{file}}
  • {% endfor %}
{% endif %} @@ -38,7 +38,7 @@

{% trans "Scientist in charge of archaeological operations" %}

    {% for operation in current_object.operation_scientist_responsability.all %} -
  • {{operation}} {% trans "show"%}
  • {% endfor %} +
  • {{operation}}
  • {% endfor %}
{% endif %} @@ -46,7 +46,7 @@

{% trans "In charge of archaeological operations" %}

    {% for operation in current_object.operation_responsability.all %} -
  • {{operation}} {% trans "show"%}
  • {% endfor %} +
  • {{operation}}
  • {% endfor %}
{% endif %} @@ -54,7 +54,7 @@

{% trans "Rapporteur CIRA des operations" %}

    {% for operation in current_object.cira_rapporteur.all %} -
  • {{operation}} {% trans "show"%}
  • {% endfor %} +
  • {{operation}}
  • {% endfor %}
{% endif %} @@ -62,7 +62,7 @@

{% trans "Administrativ act: in charge of archaeological operations" %}

    {% for adminact in current_object.adminact_operation_in_charge.all %} -
  • {{adminact}} {% trans "show"%}
  • {% endfor %} +
  • {{adminact}}
  • {% endfor %}
{% endif %} @@ -70,7 +70,7 @@

{% trans "Administrativ act: scientist in charge" %}

    {% for adminact in current_object.adminact_scientist.all %} -
  • {{adminact}} {% trans "show"%}
  • {% endfor %} +
  • {{adminact}}
  • {% endfor %}
{% endif %} @@ -78,7 +78,7 @@

{% trans "Administrativ act: signatory" %}

    {% for adminact in current_object.signatory.all %} -
  • {{adminact}} {% trans "show"%}
  • {% endfor %} +
  • {{adminact}}
  • {% endfor %}
{% endif %} @@ -95,10 +95,10 @@
    {% for treatments in current_object.treatments.all %} {% if treatment.downstream_treatment %} -
  • {{treatment.downstream_treatment}} ({% trans "downstream"%}) {% trans "show"%}
  • +
  • {{treatment.downstream_treatment}} ({% trans "downstream"%})
  • {% endif %} {% if treatment.upstream_treatment %} -
  • {{treatment.upstream_treatment}} ({% trans "upstream"%}) {% trans "show"%}
  • +
  • {{treatment.upstream_treatment}} ({% trans "upstream"%})
  • {% endif %} {% endfor %}
@@ -108,7 +108,7 @@

{% trans "Property of items" %}

    {% for property in current_object.properties.all %} -
  • {{property.find}} {% trans "show"%}
  • {% endfor %} +
  • {{property.find}}
  • {% endfor %}
{% endif %} diff --git a/ishtar_common/templatetags/link_to_window.py b/ishtar_common/templatetags/link_to_window.py index 009a089d2..79666eba8 100644 --- a/ishtar_common/templatetags/link_to_window.py +++ b/ishtar_common/templatetags/link_to_window.py @@ -4,7 +4,6 @@ from django.core.urlresolvers import reverse from django.template import Library from django.utils.safestring import mark_safe -from django.utils.translation import ugettext as _ register = Library() @@ -13,9 +12,9 @@ register = Library() def link_to_window(item): return mark_safe( u' {}'.format( - reverse(item.SHOW_URL, args=[item.pk, '']), - _("Details"))) + u'onclick="load_window(\'{}\')">' + u''.format( + reverse(item.SHOW_URL, args=[item.pk, '']))) @register.filter diff --git a/ishtar_common/views.py b/ishtar_common/views.py index d508444a4..e05d63db3 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -658,8 +658,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], datas = reversed(datas) datas = list(datas)[start:end] link_template = "%s" % \ - (unicode(_("Details"))) + "onclick='load_window(\"%s\")'>"\ + "" if data_type == "json": rows = [] for data in datas: -- cgit v1.2.3