-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRUD - agora com Delete de Board Members
- modal para confirmar o delete. - cambio ``messages.info`` por ``messages.success`` quando a operação teve sucesso. - a view function, precisa da permissão: ``'editorialmanager.delete_editorialmember`` - cambio: "Save" por "Proceed" para que fique mais claro na ação de Delete.
- Loading branch information
Showing
7 changed files
with
186 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
scielomanager/editorialmanager/templates/board/board_member_delete.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% extends "base_lv1.html" %} | ||
{% load i18n %} | ||
|
||
|
||
{% block content %} | ||
|
||
<ul class="breadcrumb"> | ||
<li><a href="{% url editorial.index %}">{% trans 'Journals' %}</a><span class="divider">/</span></li> | ||
<li><a href="{{ board_url }}">{% trans 'Editorial Board' %}</a><span class="divider">/</span></li> | ||
<li class="active">{% trans 'Delete Board Member' %}</li> | ||
</ul> | ||
|
||
|
||
<h2>{% trans "Delete Board Member" %}?:</h2> | ||
<div id="board-member-form" class="well"> | ||
|
||
{% include "board/board_member_delete_data.html" %} | ||
|
||
<div class="row-fluid"> | ||
<a class="btn btn-danger pull-left" href="{{ board_url }}">{% trans "Back to Board" %}</a> | ||
<button class="btn-submit btn btn-success pull-right">{% trans "Confirm" %}</button> | ||
</div> | ||
</div> | ||
|
||
{% endblock content %} | ||
|
||
{% block extrafooter %} | ||
{{ block.super }} | ||
<script> | ||
$(function() { | ||
$('.btn-submit').click(function(event) { | ||
$('#board-member-form').find('form').submit(); | ||
}); | ||
$('input').addClass('span12'); | ||
$(".chzn-select").chosen({ | ||
no_results_text: "{% trans 'No results found for' %}:", | ||
width: "100%", | ||
}); | ||
}); | ||
</script> | ||
{% endblock %} |
67 changes: 67 additions & 0 deletions
67
scielomanager/editorialmanager/templates/board/board_member_delete_data.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{% load i18n %} | ||
|
||
<form action="{{ post_url|default:'' }}" method="POST" class="form-horizontal"> | ||
{% csrf_token %} | ||
<div class="alert alert-error"> | ||
<h4>{% trans "This operation cannot be undone" %}</h4> | ||
<p>{% trans "And to restore it you will need to create a new member" %}</p> | ||
</div> | ||
<table class="table table-bordered table-hover table-condensed"> | ||
<tbody> | ||
<tr> | ||
<td class="span2"><strong>{% trans "First name" %}:</strong></td> | ||
<td>{{ board_member.first_name }}</td> | ||
</tr> | ||
<tr> | ||
<td class="span2"><strong>{% trans "Last name" %}:</strong></td> | ||
<td>{{ board_member.last_name }}</td> | ||
</tr> | ||
<tr> | ||
<td class="span2"><strong>{% trans "Email" %}:</strong></td> | ||
<td> | ||
<a href="mailto:{{ board_member.email }}"> | ||
<i class="icon-envelope"></i> {{ board_member.email }} | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="span2"><strong>{% trans "Role" %}:</strong></td> | ||
<td>{{ board_member.role.name }}</td> | ||
</tr> | ||
{# optional fields #} | ||
{% if board_member.institution %} | ||
<tr> | ||
<td class="span2"><strong>{% trans "Institution" %}:</strong></td> | ||
<td>{{ board_member.institution }}</td> | ||
</tr> | ||
{% endif %} | ||
{% if board_member.link_cv %} | ||
<tr> | ||
<td class="span2"><strong>{% trans "Link CV" %}:</strong></td> | ||
<td><a href="{{ board_member.link_cv }}">{{ board_member.link_cv }}</a></td> | ||
</tr> | ||
{% endif %} | ||
{% if board_member.city %} | ||
<tr> | ||
<td class="span2"><strong>{% trans "City" %}:</strong></td> | ||
<td>{{ board_member.city }}</a></td> | ||
</tr> | ||
{% endif %} | ||
{% if board_member.state %} | ||
<tr> | ||
<td class="span2"><strong>{% trans "State" %}:</strong></td> | ||
<td>{{ board_member.state }}</a></td> | ||
</tr> | ||
{% endif %} | ||
{% if board_member.country %} | ||
<tr> | ||
<td class="span2" ><strong>{% trans "Country" %}:</strong></td> | ||
<td>{{ board_member.country }}</a></td> | ||
</tr> | ||
{% endif %} | ||
</tbody> | ||
</table> | ||
|
||
</form> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters