From 99a557ce6af2648c000ccac190b9c03a336e3cbf Mon Sep 17 00:00:00 2001 From: Juan Funez Date: Thu, 18 Sep 2014 18:29:04 -0300 Subject: [PATCH 1/2] Adicionar no "home da revista" no SciELO Manager um acesso ao corpo editorial da Revista. #970 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes: #970 - listado do board agora inclui o breadcrum caso seja um editor, ou a nav bar dos journals, caso seja um librarian - includes/journal_detail_info.html mostra info inline. - removida a funcionalidade de search, pq o editor dificilmente tenha varios journals. - removidio css do form busca - UserProfile adiciona property para saber se o usuario é librarian - Adiciono item no menu do journal, para acessar o editorial board. - ajuste na condição para mostrar o item My Journal, no menu. --- .../templates/board/board_list.html | 145 ++---------------- .../templates/board/board_list_data.html | 126 +++++++++++++++ .../includes/journal_detail_info.html | 4 +- .../templates/journal/journal_list.html | 24 ++- scielomanager/editorialmanager/views.py | 61 +++++--- scielomanager/journalmanager/models.py | 6 + .../inctag_journaldash_toolbar.html | 3 + .../journalmanager/journal_dash.html | 14 +- .../scielomanager/static/css/style.css | 50 ++---- .../scielomanager/templates/base_lv1.html | 7 +- 10 files changed, 217 insertions(+), 223 deletions(-) create mode 100644 scielomanager/editorialmanager/templates/board/board_list_data.html diff --git a/scielomanager/editorialmanager/templates/board/board_list.html b/scielomanager/editorialmanager/templates/board/board_list.html index 85a74756..be0241a3 100644 --- a/scielomanager/editorialmanager/templates/board/board_list.html +++ b/scielomanager/editorialmanager/templates/board/board_list.html @@ -1,142 +1,19 @@ {% extends "base_lv1.html" %} {% load i18n %} -{% load modal %} +{% load inctag_toolbars %} +{% block page_title %}{% trans "Journal Editorial Board" %}{% endblock %} {% block content %} - + {% if request.user.get_profile.is_editor %} + + {% else %} + {% journaldash_toolbar 'editorial_board' journal user %} + {% endif %} - - - {% include "includes/journal_detail_info.html" %} - -
- - {% for issue in issues %} - {# accordion header #} - - {# accordion body #} -
-
- {# left sidebar menu #} -
-
{% trans "Actions" %}:
- {# left sidebar menu #} - -
- {# /left sidebar menu #} - {# right side #} -
-
{% trans "Editorial Board" %}:
- {% if issue.editorialboard %} -
- {% with issue.editorialboard.editorialmember_set.all as board_members %} - - {% regroup board_members by role as role_list %} - - {% for role in role_list %} - -
- - -
-
- -
    - {% for member in role.list %} -
  • -
    - -
    -
    - -

    {{ member.get_full_name }}

    -

    - {% if member.email %} - - {{ member.email }} - - {% endif %} - {% if member.institution %} • {{ member.institution }}{% endif %} - {% if member.city %} • {{ member.city }} {% endif %} - {% if member.state %} • {{ member.state }} {% endif %} - {% if member.country %} • {{ member.country }} {% endif %} -

    -
    - {# actions: edit, delete #} -
    - -
    - {% if perms.editorialmanager.change_editorialmember %} - - {% trans "Edit" %} - - {% endif %} - {% if perms.editorialmanager.delete_editorialmember %} - - {% trans "Delete" %} - - {% endif %} -
    - -
    -
    -
  • - {% endfor %} -
- -
-
-
- {% endfor %} - - {% endwith %} -
- - {% else %} -
- {% trans "This issue has no Editorial Board associated" %} -
- {% endif %} -
- {# /right side #} -
-
- {% endfor %} -
- - -{% modal_form title="Edit Member" %} -{% modal_form title="Confirm to delete this Member" modal_id="id_modal_delete_member" %} + {% include "board/board_list_data.html" %} {% endblock %} diff --git a/scielomanager/editorialmanager/templates/board/board_list_data.html b/scielomanager/editorialmanager/templates/board/board_list_data.html new file mode 100644 index 00000000..57de2c76 --- /dev/null +++ b/scielomanager/editorialmanager/templates/board/board_list_data.html @@ -0,0 +1,126 @@ +{% load i18n %} +{% load modal %} + +{% include "includes/journal_detail_info.html" %} + +
+ + {% for issue in issues %} + {# accordion header #} + + {# accordion body #} +
+
+ {# left sidebar menu #} +
+
{% trans "Actions" %}:
+ {# left sidebar menu #} + +
+ {# /left sidebar menu #} + {# right side #} +
+
{% trans "Editorial Board" %}:
+ {% if issue.editorialboard %} +
+ {% with issue.editorialboard.editorialmember_set.all as board_members %} + + {% regroup board_members by role as role_list %} + + {% for role in role_list %} + +
+ + +
+
+ +
    + {% for member in role.list %} +
  • +
    + +
    +
    + +

    {{ member.get_full_name }}

    +

    + {% if member.email %} + + {{ member.email }} + + {% endif %} + {% if member.institution %} • {{ member.institution }}{% endif %} + {% if member.city %} • {{ member.city }} {% endif %} + {% if member.state %} • {{ member.state }} {% endif %} + {% if member.country %} • {{ member.country }} {% endif %} +

    +
    + {# actions: edit, delete #} +
    + +
    + {% if perms.editorialmanager.change_editorialmember %} + + {% trans "Edit" %} + + {% endif %} + {% if perms.editorialmanager.delete_editorialmember %} + + {% trans "Delete" %} + + {% endif %} +
    + +
    +
    +
  • + {% endfor %} +
+ +
+
+
+ {% endfor %} + + {% endwith %} +
+ + {% else %} +
+ {% trans "This issue has no Editorial Board associated" %} +
+ {% endif %} +
+ {# /right side #} +
+
+ {% endfor %} +
+ + +{% modal_form title="Edit Member" %} +{% modal_form title="Confirm to delete this Member" modal_id="id_modal_delete_member" %} diff --git a/scielomanager/editorialmanager/templates/includes/journal_detail_info.html b/scielomanager/editorialmanager/templates/includes/journal_detail_info.html index f95d5b61..8c26cac7 100644 --- a/scielomanager/editorialmanager/templates/includes/journal_detail_info.html +++ b/scielomanager/editorialmanager/templates/includes/journal_detail_info.html @@ -3,7 +3,7 @@

{{ journal.title }}

- diff --git a/scielomanager/journalmanager/templates/journalmanager/journal_dash.html b/scielomanager/journalmanager/templates/journalmanager/journal_dash.html index 61dfdb69..78f8ba71 100644 --- a/scielomanager/journalmanager/templates/journalmanager/journal_dash.html +++ b/scielomanager/journalmanager/templates/journalmanager/journal_dash.html @@ -6,11 +6,11 @@ {% block page_title %}{% trans "Journals" %}{% endblock %} {% block content %} -{% journaldash_toolbar 'dashboard' journal user %} -{% trans 'Publisher' %}: {{ journal.publisher_name|default:"n.a." }}
-{% trans 'Print ISSN' %}: {{ journal.print_issn|default:"n.a." }}
-{% trans 'Electronic ISSN' %}: {{ journal.eletronic_issn|default:"n.a." }}
-{% trans 'Editor name' %}: {{ journal.editor_name|default:"n.a." }}
-{% trans 'Editor e-mail' %}: {{ journal.editor_email|default:"n.a." }}
-{% trans 'Managed by the collections' %}: {{ journal.collections.all|join:', ' }}
+ {% journaldash_toolbar 'dashboard' journal user %} + {% trans 'Publisher' %}: {{ journal.publisher_name|default:"n.a." }}
+ {% trans 'Print ISSN' %}: {{ journal.print_issn|default:"n.a." }}
+ {% trans 'Electronic ISSN' %}: {{ journal.eletronic_issn|default:"n.a." }}
+ {% trans 'Editor name' %}: {{ journal.editor_name|default:"n.a." }}
+ {% trans 'Editor e-mail' %}: {{ journal.editor_email|default:"n.a." }}
+ {% trans 'Managed by the collections' %}: {{ journal.collections.all|join:', ' }}
{% endblock %} diff --git a/scielomanager/scielomanager/static/css/style.css b/scielomanager/scielomanager/static/css/style.css index b8492e0a..22492fd9 100644 --- a/scielomanager/scielomanager/static/css/style.css +++ b/scielomanager/scielomanager/static/css/style.css @@ -499,44 +499,6 @@ table._listings h4 { border: 0px; } -#custom-search-form { - margin:0; - margin-top: 5px; - padding: 0; -} - -#custom-search-form .search-query { - padding-right: 3px; - padding-right: 4px \9; - padding-left: 3px; - padding-left: 4px \9; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - - margin-bottom: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-transition: width 0.2s ease-in-out; - -moz-transition:width 0.2s ease-in-out; - -o-transition: width 0.2s ease-in-out; - transition: width 0.2s ease-in-out; -} - -#custom-search-form button { - border: 0; - background: none; - /** belows styles are working good */ - padding: 2px 5px; - margin-top: 2px; - position: relative; - left: -28px; - /* IE7-8 doesn't have border-radius, so don't indent the padding */ - margin-bottom: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} - .search-query:focus + button { z-index: 3; } @@ -563,3 +525,15 @@ table._listings h4 { width: 80%; margin-left:-40%; /* width/2) */ } + +/* board members list (accordions) */ +.accordion-board-members li>div { + padding-left: 10px; + padding-right: 10px; +} +.accordion-board-members li div.btn-group .btn { + margin-top: 25px; +} +.accordion-board-members li div:hover { + background-color: #f5f5f5; +} diff --git a/scielomanager/scielomanager/templates/base_lv1.html b/scielomanager/scielomanager/templates/base_lv1.html index 334fb3dd..c065e0f4 100644 --- a/scielomanager/scielomanager/templates/base_lv1.html +++ b/scielomanager/scielomanager/templates/base_lv1.html @@ -21,12 +21,9 @@