From: yomguy Date: Thu, 3 Mar 2011 00:20:28 +0000 (+0100) Subject: fix relative images/, unify the rightcol player for view and edit X-Git-Tag: 1.1~416 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=38372f4787650a7b7f88d20015b71752a873b1f6;p=telemeta.git fix relative images/, unify the rightcol player for view and edit --- diff --git a/telemeta/htdocs/css/admin.css b/telemeta/htdocs/css/admin.css index c39e1a26..70c8a4f0 100644 --- a/telemeta/htdocs/css/admin.css +++ b/telemeta/htdocs/css/admin.css @@ -1,7 +1,7 @@ /* Shamelessly stolen from trac's admin.css... */ .tabs { - border: 1px solid black; + border: 1px dotted black; border-color: gray black black gray; margin: 1.8em 0; padding: .3em 0 0 .5em; diff --git a/telemeta/htdocs/css/telemeta.css b/telemeta/htdocs/css/telemeta.css index 482fc9ec..f81db508 100644 --- a/telemeta/htdocs/css/telemeta.css +++ b/telemeta/htdocs/css/telemeta.css @@ -237,10 +237,10 @@ label.disabled { color: #d7d7d7 } /* Quick search */ #quick_search { position: absolute; - top: 1.5em; + top: 1.7em; left: 35%; background-color: #6a0307; - padding: 0.5em 0em 0.5em 0.5em; + padding: 0.3em 0em 0.3em 0.3em; -moz-border-radius: 8px 8px 8px 8px; -webkit-border-radius: 8px 8px 8px 8px; border-radius: 8px 8px 8px 8px; @@ -263,6 +263,9 @@ label.disabled { color: #d7d7d7 } vertical-align: middle; font-size: .8em; margin-right: 0; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; } #quick_search_pattern { background: #FFF url(search_bg.png) no-repeat; diff --git a/telemeta/models/media.py b/telemeta/models/media.py index a78da49c..c9a4178b 100644 --- a/telemeta/models/media.py +++ b/telemeta/models/media.py @@ -219,6 +219,7 @@ class MediaItem(MediaResource): collection = ForeignKey('MediaCollection', related_name="items", verbose_name=_('collection')) + title = CharField(_('title')) track = CharField(_('item number')) old_code = CharField(_('old code'), unique=True, null=True) code = CharField(_('code'), unique=True, null=True) @@ -229,12 +230,10 @@ class MediaItem(MediaResource): location_comment = CharField(_('location details')) ethnic_group = WeakForeignKey('EthnicGroup', related_name="items", verbose_name=_('population / social group')) - title = CharField(_('title')) alt_title = CharField(_('original title / translation')) author = CharField(_('author / compositor')) vernacular_style = WeakForeignKey('VernacularStyle', related_name="items", verbose_name=_('vernacular style')) - context_comment = TextField(_('comments')) external_references = TextField(_('published reference')) moda_execut = CharField(_('moda_execut')) copied_from_item = WeakForeignKey('self', related_name="copies", verbose_name=_('copy of')) @@ -245,6 +244,7 @@ class MediaItem(MediaResource): verbose_name=_('generic style')) collector_selection = CharField(_('recordist selection')) creator_reference = CharField(_('reference')) + context_comment = TextField(_('comments')) comment = TextField(_('remarks')) file = FileField(_('file'), upload_to='items/%Y/%m/%d', db_column="filename") public_access = CharField(_('public access'), choices=PUBLIC_ACCESS_CHOICES, max_length=16, default="metadata") diff --git a/telemeta/templates/telemeta_default/base.html b/telemeta/templates/telemeta_default/base.html index 13d3fe1d..3b33b3a0 100644 --- a/telemeta/templates/telemeta_default/base.html +++ b/telemeta/templates/telemeta_default/base.html @@ -32,7 +32,7 @@
{% if user.is_authenticated %} - + Welcome, {% if user.first_name and user.last_name %} {{ user.first_name }} {{ user.last_name }} @@ -41,7 +41,7 @@ Welcome, {% endif %} Account | Help | {% trans "Sign out" %} - + {% else %} Help | {% trans "Sign in" %} diff --git a/telemeta/templates/telemeta_default/collection_detail.html b/telemeta/templates/telemeta_default/collection_detail.html index 1c68a22a..21703eff 100644 --- a/telemeta/templates/telemeta_default/collection_detail.html +++ b/telemeta/templates/telemeta_default/collection_detail.html @@ -1,167 +1,167 @@ -{% extends "telemeta/base.html" %} -{% load telemeta_utils %} -{% load i18n %} - -{% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %} - -{% block extra_javascript %} - -{% endblock %} - -{% if collection %} - -{% block submenu %} -
- Dublin Core - - {% if user.is_authenticated %} - EDIT - {% endif %} - -
-{% endblock %} - -{% block content %} -

Collection: {{ collection }}

-
- {% if collection.has_mediafile %} -
-
-

Listen to this collection - (M3U, - XSPF)

- -

- Get Flash to see this player. -

- -
-
- {% endif %} -
- {% if collection.items.count %}{{ collection.items.count }} {% ifequal collection.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %} -
-
- {% block general_info %} -
- {% dl_field collection "reference" %} - {% dl_field collection "title" %} - {% dl_field collection "alt_title" %} - {% dl_field collection "creator" %} - {% dl_field collection "recording_context" %} - {% if collection.recorded_from_year %} -
{% trans "Recording year" %}
-
{{ collection.recorded_from_year|default:'' }} {{ collection.recorded_to_year|prepend:" - " }}
- {% endif %} - {% dl_field collection "year_published" %} -
- {% endblock general_info %} -
-
- {% block geoethnic_data %} -
-

{% trans "Geographic and cultural informations" %}

-
-
- {% dl_field collection "countries" join with ", " %} - {% dl_field collection "ethnic_groups" join with ", " %} -
-
-
- {% endblock geoethnic_data %} -
-
- {% block legal_data %} -
-

{% trans "Legal mentions" %}

-
-
- {% if collection.collector_is_creator %} - {% if collection.creator %} -
{% trans "Recordist" %}
{{ collection.creator }}
- {% endif%} - {% else %} - {% dl_field collection "collector" %} - {% endif %} - {% dl_field collection "publisher" %} - {% dl_field collection "publisher_collection" %} - {% dl_field collection "publisher_serial" %} - {% dl_field collection "booklet_author" %} - {% dl_field collection "external_references" %} - {% dl_field collection "doctype_code" %} - {% dl_field collection "public_access_label" %} - {% dl_field collection "legal_rights" %} -
-
-
- {% endblock legal_data %} -
-
- {% block archive_data %} -
-

{% trans "Archiving data" %}

-
-
- {% dl_field collection "acquisition_mode" %} - {% dl_field collection "cnrs_contributor" %} - {% dl_field collection "metadata_author" %} - {% dl_field collection "booklet_description" %} - {% dl_field collection "publishing_status" %} - - {% dl_field collection "comment" %} - {% dl_field collection "metadata_writer" %} - {% dl_field collection "travail" %} - {% dl_field collection "items_done" %} -
-
-
- {% endblock archive_data %} -
-
- {% block technical_data %} -
-

{% trans "Technical data" %}

-
-
- {% dl_field collection "code" %} - {% dl_field collection "old_code" %} -
{% trans "Media type" %}
{% trans "Audio" %}
- {% dl_field collection "approx_duration" %} - {% dl_field collection "computed_duration" %} - {% dl_field collection "physical_items_num" %} -
-
{% trans "Number of items" %}
{{ collection.items.count }}
- {% dl_field collection "physical_format" %} - {% dl_field collection "ad_conversion" %} -
-
-
- {% endblock technical_data %} -
-

Items

- {% with collection.items.enriched as items %} - {% with "1" as location_name %} - {% include "telemeta/inc/mediaitem_list.html" %} - {% endwith %} - {% endwith %} - -
-
-{% endblock %} -{% else %} -

No such collection

-{% endif %} - +{% extends "telemeta/base.html" %} +{% load telemeta_utils %} +{% load i18n %} + +{% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %} + +{% block extra_javascript %} + +{% endblock %} + +{% if collection %} + +{% block submenu %} +
+ Dublin Core + + {% if user.is_authenticated %} + EDIT + {% endif %} + +
+{% endblock %} + +{% block content %} +

Collection: {{ collection }}

+
+ {% if collection.has_mediafile %} +
+
+

Listen to this collection + (M3U, + XSPF)

+ +

+ Get Flash to see this player. +

+ +
+
+ {% endif %} +
+ {% if collection.items.count %}{{ collection.items.count }} {% ifequal collection.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %} +
+
+ {% block general_info %} +
+ {% dl_field collection "reference" %} + {% dl_field collection "title" %} + {% dl_field collection "alt_title" %} + {% dl_field collection "creator" %} + {% dl_field collection "recording_context" %} + {% if collection.recorded_from_year %} +
{% trans "Recording year" %}
+
{{ collection.recorded_from_year|default:'' }} {{ collection.recorded_to_year|prepend:" - " }}
+ {% endif %} + {% dl_field collection "year_published" %} +
+ {% endblock general_info %} +
+
+ {% block geoethnic_data %} +
+

{% trans "Geographic and cultural informations" %}

+
+
+ {% dl_field collection "countries" join with ", " %} + {% dl_field collection "ethnic_groups" join with ", " %} +
+
+
+ {% endblock geoethnic_data %} +
+
+ {% block legal_data %} +
+

{% trans "Legal mentions" %}

+
+
+ {% if collection.collector_is_creator %} + {% if collection.creator %} +
{% trans "Recordist" %}
{{ collection.creator }}
+ {% endif%} + {% else %} + {% dl_field collection "collector" %} + {% endif %} + {% dl_field collection "publisher" %} + {% dl_field collection "publisher_collection" %} + {% dl_field collection "publisher_serial" %} + {% dl_field collection "booklet_author" %} + {% dl_field collection "external_references" %} + {% dl_field collection "doctype_code" %} + {% dl_field collection "public_access_label" %} + {% dl_field collection "legal_rights" %} +
+
+
+ {% endblock legal_data %} +
+
+ {% block archive_data %} +
+

{% trans "Archiving data" %}

+
+
+ {% dl_field collection "acquisition_mode" %} + {% dl_field collection "cnrs_contributor" %} + {% dl_field collection "metadata_author" %} + {% dl_field collection "booklet_description" %} + {% dl_field collection "publishing_status" %} + + {% dl_field collection "comment" %} + {% dl_field collection "metadata_writer" %} + {% dl_field collection "travail" %} + {% dl_field collection "items_done" %} +
+
+
+ {% endblock archive_data %} +
+
+ {% block technical_data %} +
+

{% trans "Technical data" %}

+
+
+ {% dl_field collection "code" %} + {% dl_field collection "old_code" %} +
{% trans "Media type" %}
{% trans "Audio" %}
+ {% dl_field collection "approx_duration" %} + {% dl_field collection "computed_duration" %} + {% dl_field collection "physical_items_num" %} +
+
{% trans "Number of items" %}
{{ collection.items.count }}
+ {% dl_field collection "physical_format" %} + {% dl_field collection "ad_conversion" %} +
+
+
+ {% endblock technical_data %} +
+

Items

+ {% with collection.items.enriched as items %} + {% with "1" as location_name %} + {% include "telemeta/inc/mediaitem_list.html" %} + {% endwith %} + {% endwith %} + +
+ +{% endblock %} +{% else %} +

No such collection

+{% endif %} + diff --git a/telemeta/templates/telemeta_default/collection_detail_edit.html b/telemeta/templates/telemeta_default/collection_detail_edit.html index 3313bedc..f70d98cd 100644 --- a/telemeta/templates/telemeta_default/collection_detail_edit.html +++ b/telemeta/templates/telemeta_default/collection_detail_edit.html @@ -18,7 +18,7 @@ {% block submenu %}
Dublin Core - +
{% endblock %} @@ -31,8 +31,8 @@
- - + +
diff --git a/telemeta/templates/telemeta_default/mediaitem_detail.html b/telemeta/templates/telemeta_default/mediaitem_detail.html index f3b868cd..e8179d53 100644 --- a/telemeta/templates/telemeta_default/mediaitem_detail.html +++ b/telemeta/templates/telemeta_default/mediaitem_detail.html @@ -127,10 +127,12 @@ {% if user.is_authenticated and user.is_staff%} - EDIT + {% block tools %} + EDIT + {% endblock tools %} {% endif %} - PREVIOUS - NEXT + PREVIOUS + NEXT @@ -138,11 +140,8 @@ {% endblock %} {% block content %} - -

Item : {{ item }}

- +

Item : {{ item }}

- {% if item.file %}
Minimize @@ -164,14 +163,9 @@
- - - -
-
-  Visualization : +  Visualization :
- - {% if audio_export_enabled %}
-

{% trans "Download:" %} +

{% trans "Download:" %} {% for format in export_formats %} - {{ format.extension }} + {{ format.extension }} {% endfor %}

{% endif %} @@ -252,6 +244,7 @@
{% endif %} + {% block infos %}
{% block general_info %}
@@ -360,9 +353,8 @@
{% endblock technical_data %} - + {% endblock infos %} - {% endblock %} {% else %}

No such item

diff --git a/telemeta/templates/telemeta_default/mediaitem_detail_edit.html b/telemeta/templates/telemeta_default/mediaitem_detail_edit.html index 7e87d67f..d74d06f9 100644 --- a/telemeta/templates/telemeta_default/mediaitem_detail_edit.html +++ b/telemeta/templates/telemeta_default/mediaitem_detail_edit.html @@ -1,158 +1,21 @@ -{% extends "telemeta/base.html" %} -{% load telemeta_utils %} -{% load i18n %} - -{% block head_title %}{% trans "Item" %}{{item|prepend:': '}} - {{ block.super }}{% endblock %} - -{% block stylesheets %} -{{ block.super }} - - - - {% endblock %} - {% block extra_javascript %} - - - - - - - - -{% endblock %} - - -{% if item %} -{% block submenu %} -
- Dublin Core - - -
- -{% endblock %} - -{% block content %} -

Item : {{ item }}

-
- - {% if item.file %} -
- Minimize -
-
-
-
- Maximize -
-
-
-
-
- - -
-
-
-
-
- -
-
-
-
-
-
- - - -
- -
- - - - - - - {% for analyser in analysers %} - - - - - - {% endfor %} -
PropertyValueUnit
- {{ analyser.name }} - - {{ analyser.value }} - - {{ analyser.unit }} -
-
- -
-
- {% if audio_export_enabled %} -
-

{% trans "Download:" %} - {% for format in export_formats %} - {{ format.name }} - {% endfor %}

-
- {% endif %} - +{% extends "telemeta/mediaitem_detail.html" %} + + {% block tools %} + + + {% endblock tools %} + + {% block infos %} +
+
{% csrf_token %} + + {{ form }} +
+
+ + + +
+
- {% endif %} - -
-
{% csrf_token %} - - {{ form }} -
-
- - - -
-
-
- -
- -{% endblock %} - -{% else %} -

No such item

-{% endif %} + {% endblock infos %} diff --git a/telemeta/urls.py b/telemeta/urls.py index 42bfebfb..f8c1d244 100644 --- a/telemeta/urls.py +++ b/telemeta/urls.py @@ -161,7 +161,7 @@ urlpatterns = patterns('', url(r'^css/(?P.*)$', 'django.views.static.serve', {'document_root': htdocs+'/css'}, name="telemeta-css"), - url(r'^images/(?P.*)$', 'django.views.static.serve', + url(r'images/(?P.*)$', 'django.views.static.serve', {'document_root': htdocs+'/images'}, name="telemeta-images"), url(r'^js/(?P.*)$', 'django.views.static.serve', diff --git a/telemeta/web/base.py b/telemeta/web/base.py index e325effc..a18d5b2e 100644 --- a/telemeta/web/base.py +++ b/telemeta/web/base.py @@ -465,15 +465,15 @@ class WebView(object): def __get_admin_context_vars(self): return {"enumerations": self.__get_enumerations_list()} - @method_decorator(login_required) #@login_required + @method_decorator(login_required) def admin_index(self, request): return render(request, 'telemeta/admin.html', self.__get_admin_context_vars()) - @method_decorator(login_required) #@login_required + @method_decorator(login_required) def admin_general(self, request): return render(request, 'telemeta/admin_general.html', self.__get_admin_context_vars()) - @method_decorator(login_required) #@login_required + @method_decorator(login_required) def admin_enumerations(self, request): return render(request, 'telemeta/admin_enumerations.html', self.__get_admin_context_vars())