From 03e775edfda1739488820a67097dd167078b42b1 Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 12 Apr 2012 15:39:33 +0200 Subject: [PATCH] fix profile view --- teleforma/htdocs/css/teleforma_black.css | 23 ++- .../teleforma/inc/conference_list.html | 2 +- .../teleforma/inc/document_list.html | 2 +- .../templates/teleforma/inc/media_list.html | 2 +- teleforma/templates/telemeta/base.html | 2 +- .../telemeta/inc/module_revisions.html | 49 ++++++ .../telemeta/inc/module_searches.html | 27 +++ .../telemeta/inc/module_user_revisions.html | 11 ++ .../templates/telemeta/profile_detail.html | 84 ++++++++++ .../templates/telemeta/search_criteria.html | 156 ++++++++++++++++++ 10 files changed, 349 insertions(+), 9 deletions(-) create mode 100644 teleforma/templates/telemeta/inc/module_revisions.html create mode 100644 teleforma/templates/telemeta/inc/module_searches.html create mode 100644 teleforma/templates/telemeta/inc/module_user_revisions.html create mode 100644 teleforma/templates/telemeta/profile_detail.html create mode 100644 teleforma/templates/telemeta/search_criteria.html diff --git a/teleforma/htdocs/css/teleforma_black.css b/teleforma/htdocs/css/teleforma_black.css index cfdee9e2..02f88829 100644 --- a/teleforma/htdocs/css/teleforma_black.css +++ b/teleforma/htdocs/css/teleforma_black.css @@ -385,11 +385,10 @@ form.login .submit { margin: 15px 0; } #searchform fieldset { - padding: 0; - padding: .5em; + background-color: #FFF; + padding: .8em; width: 650px; border: none; - border: 1px solid #000000; margin-bottom: 1em; -moz-border-radius: 8px 0px 8px 8px; -webkit-border-radius: 8px 0px 8px 8px; @@ -697,7 +696,9 @@ dl.dublincore dd.caption { /* infos item/collection */ .infos, .extraInfos { + margin-bottom: 15px; + padding: 0.8em; } .infos dl, .infos table { @@ -1169,6 +1170,12 @@ a.image-link { padding:0.8em 0.8em 0.8em 0.8em; } +#action_yellow { + background-color: #f3ad17; + color: #FFF; + padding:0.8em 0.8em 0.8em 0.8em; + } + .list_item, .list_item:visited, .list_item:hover{ display:block; @@ -1406,12 +1413,18 @@ input,textarea{ -moz-border-radius: 8px 0px 8px 8px; -webkit-border-radius: 8px 0px 8px 8px; border-radius: 8px 0px 8px 8px; - padding: 0em 0em 0.1em 0em; + padding: 0em 0em 0em 0em; + margin-top: 0.8em; } .course_content h2 { - padding: 0.5em 0.8em 0em 0.8em; + padding: 0.5em 0.8em 0.8em 0.8em; + } + +.course_content h3 { + padding: 0.5em 0.8em 0.8em 0.8em; + margin-top: 0.8em; } .course_media { diff --git a/teleforma/templates/teleforma/inc/conference_list.html b/teleforma/templates/teleforma/inc/conference_list.html index f3f840c1..62e2bf2b 100644 --- a/teleforma/templates/teleforma/inc/conference_list.html +++ b/teleforma/templates/teleforma/inc/conference_list.html @@ -2,7 +2,7 @@ {% if course.conference.all %}
-

{% trans "Conferences"%}

+

{% trans "Conferences"%}

diff --git a/teleforma/templates/teleforma/inc/document_list.html b/teleforma/templates/teleforma/inc/document_list.html index 971667d3..3a289a18 100644 --- a/teleforma/templates/teleforma/inc/document_list.html +++ b/teleforma/templates/teleforma/inc/document_list.html @@ -2,7 +2,7 @@ {% if course.document.all %}
-

{% trans "Documents"%}

+

{% trans "Documents"%}

diff --git a/teleforma/templates/teleforma/inc/media_list.html b/teleforma/templates/teleforma/inc/media_list.html index 35cd4cc7..d3f4a993 100644 --- a/teleforma/templates/teleforma/inc/media_list.html +++ b/teleforma/templates/teleforma/inc/media_list.html @@ -2,7 +2,7 @@ {% if course.media.all %}
-

{% trans "Medias"%}

+

{% trans "Medias"%}

diff --git a/teleforma/templates/telemeta/base.html b/teleforma/templates/telemeta/base.html index 4511e7f5..9c684691 100644 --- a/teleforma/templates/telemeta/base.html +++ b/teleforma/templates/telemeta/base.html @@ -96,7 +96,7 @@ alt="Telemeta Powered"/>--> {% endif %} -
  • user{% if user.first_name and user.last_name %} +
  • user{% if user.first_name and user.last_name %} {{ user.first_name }} {{ user.last_name }} {% else %} {{ user.username }} diff --git a/teleforma/templates/telemeta/inc/module_revisions.html b/teleforma/templates/telemeta/inc/module_revisions.html new file mode 100644 index 00000000..2f3c81c3 --- /dev/null +++ b/teleforma/templates/telemeta/inc/module_revisions.html @@ -0,0 +1,49 @@ +{% load telemeta_utils %} +{% load i18n %} + +
  • + + + + + + + {% for r in revisions %} + + + + + + + {% endfor %} +
    {% trans "Date" %}{% trans "Title" %}{% trans "Type" %}{% trans "User" %}
    {{ r.revision.time }} + {% if r.element %} + {% if r.revision.element_type == "corpus" or r.revision.element_type == "fonds"%} + {{ r.element.title }} + {% endif %} + {% if r.revision.element_type == "collection" %} + {{ r.element.title }} + {% endif %} + {% if r.revision.element_type == "item" %} + + {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.collection.title }} - {{ r.element.track }}{% endif %} + {% endif %} + {% if r.revision.element_type == "marker" %} + {{ r.element.title }} + {% endif %} + {% else %} + {% trans "deleted" %} + {% endif %} + {{ r.revision.element_type }}{% if r.revision.user %}{{ r.revision.user.username }}{% endif %}
    +
    + \ No newline at end of file diff --git a/teleforma/templates/telemeta/inc/module_searches.html b/teleforma/templates/telemeta/inc/module_searches.html new file mode 100644 index 00000000..b3896471 --- /dev/null +++ b/teleforma/templates/telemeta/inc/module_searches.html @@ -0,0 +1,27 @@ +{% load telemeta_utils %} +{% load i18n %} + +
    +

    + rss + {% trans title %}

    + +
    + + + + + {% for s in searches %} + + + + {% endfor %} +
    {% trans "Criteria" %}
    + {% for c in s.criteria.all %} +
  • {% trans c.key %} : {{ c.value}}
  • + {% endfor %} +
    +
    +
    +
    + diff --git a/teleforma/templates/telemeta/inc/module_user_revisions.html b/teleforma/templates/telemeta/inc/module_user_revisions.html new file mode 100644 index 00000000..9c017056 --- /dev/null +++ b/teleforma/templates/telemeta/inc/module_user_revisions.html @@ -0,0 +1,11 @@ +{% extends "telemeta/inc/module_revisions.html" %} +{% load telemeta_utils %} +{% load i18n %} + +{% block rss_title %} + +rss +

    {% trans title %}

    +   +{% endblock rss_title %} + diff --git a/teleforma/templates/telemeta/profile_detail.html b/teleforma/templates/telemeta/profile_detail.html new file mode 100644 index 00000000..90dba8a9 --- /dev/null +++ b/teleforma/templates/telemeta/profile_detail.html @@ -0,0 +1,84 @@ +{% extends "telemeta/base.html" %} +{% load i18n %} +{% load telemeta_utils %} + +{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %} + +{% block title %} +{% endblock %} + +{% block content %} +
    + {% block modules %} + + {% block module_user_revisions %} + {% with user_revisions as revisions and "My last changes" as title %} + {% include "telemeta/inc/module_user_revisions.html" %} + {% endwith %} + {% endblock %} + + {% endblock %} + + {% if user.is_authenticated and user.username == usr.username or user.is_staff %} + + {% endif %} + +
    + +
    +
    + +

    {% trans "User profile" %} : {{ usr.username }} +

    + + {% if user.is_authenticated and user.username == usr.username %} + + {% endif %} + +
    + +
    +
    +
    {% trans "First Name" %}
    {{ usr.first_name }}
    +
    {% trans "Last Name" %}
    {{ usr.last_name }}
    +
    {% trans "Email" %}
    {{ usr.email }}
    + +
    {% trans "Institution" %}
    {% if profile %}{{ profile.institution }}{% endif %}
    +
    {% trans "Department" %}
    {% if profile %}{{ profile.department }}{% endif %}
    +
    {% trans "Function" %}
    {% if profile %}{{ profile.function }}{% endif %}
    +
    {% trans "Attachment" %}
    {% if profile %}{{ profile.attachment }}{% endif %}
    +
    {% trans "Address" %}
    {% if profile %}{{ profile.address }}{% endif %}
    +
    {% trans "Telephone" %}
    {% if profile %}{{ profile.telephone }}{% endif %}
    +
    {% trans "Expiration date" %}
    {% if profile %}{{ profile.expiration_date }}{% endif %}
    + +
    {% trans "Is staff" %}
    {{ usr.is_staff }}
    +
    {% trans "Is superuser" %}
    {{ usr.is_superuser }}
    +
    {% blocktrans count user.groups.all.count as counter %}Group{% plural %}Groups{% endblocktrans %}
    {% for group in usr.groups.all %}{{ group }} {% endfor %}
    +
    {% trans "Last login" %}
    {{ usr.last_login }}
    + {% if user.is_authenticated and user.username == usr.username %} +
    {% trans "Language" %}
    {% csrf_token %} + +

    + {% trans "Apply" %} +
    +
    + {% endif %} +
    +
    + +
    + + +
    +
    +{% endblock content %} + diff --git a/teleforma/templates/telemeta/search_criteria.html b/teleforma/templates/telemeta/search_criteria.html new file mode 100644 index 00000000..d5606311 --- /dev/null +++ b/teleforma/templates/telemeta/search_criteria.html @@ -0,0 +1,156 @@ +{% extends "telemeta/base.html" %} +{% load telemeta_utils %} +{% load i18n %} + +{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %} + +{% block stylesheets %} +{{ block.super }} + +{% endblock %} + +{% block extra_javascript %} + + + +{% endblock %} + +{% block title %} +{% endblock %} + +{% block content %} + +
    + + {% block module_searches %} + {% with searches as searches and "My searches" as title %} + {% include "telemeta/inc/module_searches.html" %} + {% endwith %} + {% endblock %} + + +
    + +
    +
    +

    {% trans "Advanced Search" %}

    +
    {% csrf_token %} +
    + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + {% if rec_years %} +

    + + + {% trans "to" %} + +

    + {% endif %} + + {% if pub_years %} +

    + + + {% trans "to" %} + +

    + {% endif %} + +

    + +

    + +
    + +
    +
    +
    +{% endblock %} -- 2.39.5