Skip to content

Commit

Permalink
Merge pull request #981 from jfunez/970_ver_board_no_journal_dash
Browse files Browse the repository at this point in the history
Adicionar no "home da revista" no SciELO Manager um acesso ao corpo edit...
  • Loading branch information
jamilatta committed Sep 19, 2014
2 parents 7e39798 + 15ed6a9 commit 112876c
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 223 deletions.
145 changes: 11 additions & 134 deletions scielomanager/editorialmanager/templates/board/board_list.html
Original file line number Diff line number Diff line change
@@ -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 %}

<style>
.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; }
</style>
{% if request.user.get_profile.is_editor %}
<ul class="breadcrumb">
<li><a href="{% url editorial.index %}">{% trans 'Journals' %}</a><span class="divider">/</span></li>
<li class="active">{% trans 'Editorial Board' %}</li>
</ul>
{% else %}
{% journaldash_toolbar 'editorial_board' journal user %}
{% endif %}

<ul class="breadcrumb">
<li><a href="{% url editorial.index %}">{% trans 'Journals' %}</a><span class="divider">/</span></li>
<li class="active">{% trans 'Editorial Board' %}</li>
</ul>

{% include "includes/journal_detail_info.html" %}

<div id="accordion-issues" class="accordion">

{% for issue in issues %}
{# accordion header #}
<div class="accordion-heading">
<a href="#collapse_issue_pk_{{ issue.pk }}" data-parent="#accordion-issues" data-toggle="collapse" class="accordion-toggle">
{{ issue.publication_year }} &raquo; {% trans "Volume" %}: {{ issue.volume }} &raquo; {% trans "Number" %}: {{ issue.number }}
</a>
</div>
{# accordion body #}
<div class="accordion-body collapse {% if forloop.first %} in{% endif %}" id="collapse_issue_pk_{{ issue.pk }}">
<div class="accordion-inner">
{# left sidebar menu #}
<div class="span2">
<h5>{% trans "Actions" %}:</h5>
{# left sidebar menu #}
<ul class="nav nav-tabs nav-stacked">
<li>
<a href="{% url editorial.journal.edit journal.pk %}">
<i class="icon-pencil"></i> {% trans "Edit Journal" %}
</a>
</li>
{% if perms.editorialmanager.add_editorialmember %}
<li>
<a data-target='#id_modal_form' data-toggle="modal" href="{% url editorial.board.add journal.pk issue.pk %}">
<i class="icon-plus-sign"></i> {% trans "Add New Member" %}
</a>
</li>
{% endif %}
</ul>
</div>
{# /left sidebar menu #}
{# right side #}
<div class="span10">
<h5>{% trans "Editorial Board" %}:</h5>
{% if issue.editorialboard %}
<div class="accordion" id="accordion_members_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}">
{% with issue.editorialboard.editorialmember_set.all as board_members %}

{% regroup board_members by role as role_list %}

{% for role in role_list %}

<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse"
data-parent="#accordion_members_{{ issue.pk }}_{{ board.pk }}_{{ forloop.parentloop.counter }}"
href="#collpase_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}">
{{ role.grouper }}
</a>
</div>

<div id="collpase_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}" class="accordion-body collapse {% if forloop.first %} in{% endif %}">
<div class="accordion-inner">

<ul class="unstyled accordion-board-members">
{% for member in role.list %}
<li>
<div class="board-member-details">

<div class="span12">
<div class="span10">

<h4><strong>{{ member.get_full_name }}</strong></h4>
<p>
{% if member.email %}
<a href="mailto:{{ member.email }}">
<i class="icon-envelope"></i> {{ member.email }}
</a>
{% endif %}
{% if member.institution %} &bull; {{ member.institution }}{% endif %}
{% if member.city %} &bull; {{ member.city }} {% endif %}
{% if member.state %} &bull; {{ member.state }} {% endif %}
{% if member.country %} &bull; {{ member.country }} {% endif %}
</p>
</div>
{# actions: edit, delete #}
<div class="span2 pull-right">

<div class="btn-group pull-right">
{% if perms.editorialmanager.change_editorialmember %}
<a data-target='#id_modal_form' data-toggle="modal" href="{% url editorial.board.edit journal.pk member.pk %}" class="btn btn-mini btn-primary">
<i class="icon-pencil"></i> {% trans "Edit" %}
</a>
{% endif %}
{% if perms.editorialmanager.delete_editorialmember %}
<a data-target='#id_modal_delete_member' data-toggle="modal" href="{% url editorial.board.delete journal.pk member.pk %}" class="btn btn-mini btn-danger">
<i class="icon-remove"></i> {% trans "Delete" %}
</a>
{% endif %}
</div>

</div>
</div>
</li>
{% endfor %}
</ul>

</div>
</div>
</div>
{% endfor %}

{% endwith %}
</div>

{% else %}
<div class="alert alert-error">
<i class="icon-exclamation-sign"></i> {% trans "This issue has no Editorial Board associated" %}
</div>
{% endif %}
</div>
{# /right side #}
</div>
</div>
{% endfor %}
</div>
</div>

{% 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 %}
126 changes: 126 additions & 0 deletions scielomanager/editorialmanager/templates/board/board_list_data.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{% load i18n %}
{% load modal %}

{% include "includes/journal_detail_info.html" %}

<div id="accordion-issues" class="accordion">

{% for issue in issues %}
{# accordion header #}
<div class="accordion-heading">
<a href="#collapse_issue_pk_{{ issue.pk }}" data-parent="#accordion-issues" data-toggle="collapse" class="accordion-toggle">
{{ issue.publication_year }} &raquo; {% trans "Volume" %}: {{ issue.volume }} &raquo; {% trans "Number" %}: {{ issue.number }}
</a>
</div>
{# accordion body #}
<div class="accordion-body collapse {% if forloop.first %} in{% endif %}" id="collapse_issue_pk_{{ issue.pk }}">
<div class="accordion-inner">
{# left sidebar menu #}
<div class="span2">
<h5>{% trans "Actions" %}:</h5>
{# left sidebar menu #}
<ul class="nav nav-tabs nav-stacked">
<li>
<a href="{% url editorial.journal.edit journal.pk %}">
<i class="icon-pencil"></i> {% trans "Edit Journal" %}
</a>
</li>
{% if perms.editorialmanager.add_editorialmember %}
<li>
<a data-target='#id_modal_form' data-toggle="modal" href="{% url editorial.board.add journal.pk issue.pk %}">
<i class="icon-plus-sign"></i> {% trans "Add New Member" %}
</a>
</li>
{% endif %}
</ul>
</div>
{# /left sidebar menu #}
{# right side #}
<div class="span10">
<h5>{% trans "Editorial Board" %}:</h5>
{% if issue.editorialboard %}
<div class="accordion" id="accordion_members_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}">
{% with issue.editorialboard.editorialmember_set.all as board_members %}

{% regroup board_members by role as role_list %}

{% for role in role_list %}

<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse"
data-parent="#accordion_members_{{ issue.pk }}_{{ board.pk }}_{{ forloop.parentloop.counter }}"
href="#collpase_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}">
{{ role.grouper }}
</a>
</div>

<div id="collpase_{{ issue.pk }}_{{ board.pk }}_{{ forloop.counter }}" class="accordion-body collapse {% if forloop.first %} in{% endif %}">
<div class="accordion-inner">

<ul class="unstyled accordion-board-members">
{% for member in role.list %}
<li>
<div class="board-member-details">

<div class="span12">
<div class="span10">

<h4><strong>{{ member.get_full_name }}</strong></h4>
<p>
{% if member.email %}
<a href="mailto:{{ member.email }}">
<i class="icon-envelope"></i> {{ member.email }}
</a>
{% endif %}
{% if member.institution %} &bull; {{ member.institution }}{% endif %}
{% if member.city %} &bull; {{ member.city }} {% endif %}
{% if member.state %} &bull; {{ member.state }} {% endif %}
{% if member.country %} &bull; {{ member.country }} {% endif %}
</p>
</div>
{# actions: edit, delete #}
<div class="span2 pull-right">

<div class="btn-group pull-right">
{% if perms.editorialmanager.change_editorialmember %}
<a data-target='#id_modal_form' data-toggle="modal" href="{% url editorial.board.edit journal.pk member.pk %}" class="btn btn-mini btn-primary">
<i class="icon-pencil"></i> {% trans "Edit" %}
</a>
{% endif %}
{% if perms.editorialmanager.delete_editorialmember %}
<a data-target='#id_modal_delete_member' data-toggle="modal" href="{% url editorial.board.delete journal.pk member.pk %}" class="btn btn-mini btn-danger">
<i class="icon-remove"></i> {% trans "Delete" %}
</a>
{% endif %}
</div>

</div>
</div>
</li>
{% endfor %}
</ul>

</div>
</div>
</div>
{% endfor %}

{% endwith %}
</div>

{% else %}
<div class="alert alert-error">
<i class="icon-exclamation-sign"></i> {% trans "This issue has no Editorial Board associated" %}
</div>
{% endif %}
</div>
{# /right side #}
</div>
</div>
{% endfor %}
</div>
</div>

{% modal_form title="Edit Member" %}
{% modal_form title="Confirm to delete this Member" modal_id="id_modal_delete_member" %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<a data-target='#modal' data-toggle="modal" href="{% url editorial.journal.detail journal.pk %}">
<h4>{{ journal.title }}</h4>
</a>
<ul class="unstyled">
<ul class="inline">
<li>
<span class="muted">{% trans "On-line version ISSN" %}:</span>
<strong>{{ journal.scielo_pid }}</strong>
Expand All @@ -13,7 +13,7 @@ <h4>{{ journal.title }}</h4>
{% if journal.editor %}
<strong>{{ journal.editor.get_full_name }}</strong>
{% else %}
<em>{% trans "No assigned yet" %}</em>
<em>{% trans "Not assigned yet" %}</em>
{% endif %}
</li>
<li>
Expand Down
24 changes: 10 additions & 14 deletions scielomanager/editorialmanager/templates/journal/journal_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,8 @@
</ul>

<div class="row-fluid show-grid">
<div class="span9">
{% if objects_journal.object_list %}
<div class="span12">
<form id="custom-search-form" class="form-search form-horizontal">
<div class="input-append span12">
<input type="text" class="search-query mac-style span6" placeholder="{% trans 'Search' %}">
<button type="submit" class="btn"><i class="icon-search"></i></button>
</div>
</form>
</div>
<p class="muted">{% trans 'Fields: ISSN(s), title, abbreviated title and acronym' %}</p>
{% endif %}
</div>
<div class="span3">

<div class="span3 pull-right">
<div class="pull-right">
{% simple_pagination objects_journal %}
</div>
Expand Down Expand Up @@ -53,6 +41,14 @@
</div>
</td>
</tr>
{% empty %}
<tr>
<td>
<div class="alert alert-info">
{% trans "No Journals found" %}
</div>
</td>
</tr>

{% endfor %}

Expand Down
Loading

0 comments on commit 112876c

Please sign in to comment.