mirror of https://github.com/interlegis/sigi.git
Marcio Mazza
10 years ago
7 changed files with 283 additions and 82 deletions
@ -1,13 +1,10 @@ |
|||
{% extends "admin/change_list.html" %} |
|||
{% load admin_list i18n reporting_tags %} |
|||
|
|||
{% block object-tools %} |
|||
<ul class="object-tools"> |
|||
<li><a onclick="return showRelatedObjectLookupPopup(this);" href="carrinho/{{query_str}}">Carrinho / Exportar</a></li> |
|||
<li> |
|||
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink"> |
|||
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
{% endblock %} |
|||
{% block object-tools-items %} |
|||
<li><a class="btn" onclick="return showRelatedObjectLookupPopup(this);" href="carrinho/{{query_str}}"> |
|||
<span class="glyphicon glyphicon-shopping-cart"></span> |
|||
Carrinho / Exportar |
|||
</a></li> |
|||
{{ block.super }} |
|||
{% endblock %} |
|||
|
@ -1,82 +1,172 @@ |
|||
{% load admin_static %}{% load firstof from future %} |
|||
<!DOCTYPE html> |
|||
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> |
|||
{% load admin_static bootstrapped_goodies_tags %} |
|||
{% load tree_menu_tags %} |
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|||
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> |
|||
<head> |
|||
<title>{% block title %}{% endblock %}</title> |
|||
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" /> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
|
|||
{% block extrastyle %}{% endblock %} |
|||
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% static "admin/css/ie.css" %}{% endblock %}" /><![endif]--> |
|||
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %} |
|||
<script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script> |
|||
|
|||
<!-- Le styles, placed after extrastyle to correctly override default styling --> |
|||
<link href="{% static "bootstrap/css/bootstrap.min.css" %}" rel="stylesheet"/> |
|||
<style type="text/css"> |
|||
body { |
|||
padding-top: 10px; |
|||
padding-bottom: 40px; |
|||
} |
|||
</style> |
|||
<link href="{% static "bootstrap/css/bootstrap-theme.min.css" %}" rel="stylesheet"/> |
|||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/overrides.css" %}" /> |
|||
|
|||
<!-- <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" /> --> |
|||
<script type="text/javascript"> |
|||
//<![CDATA[ |
|||
window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}"; |
|||
//]]> |
|||
</script> |
|||
<script src="{% static "admin/js/jquery-1.9.1.min.js" %}"></script> |
|||
<script src="{% static "admin/js/jquery-migrate-1.2.1.min.js" %}"></script> |
|||
<script src="{% static "bootstrap/js/bootstrap.min.js" %}"></script> |
|||
|
|||
{% block extrahead %}{% endblock %} |
|||
|
|||
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %} |
|||
<script type="text/javascript"> |
|||
//<![CDATA[ |
|||
(function($) { |
|||
$(document).ready(function() { |
|||
$('input[type="submit"]').addClass('btn'); |
|||
$('[title]').tooltip(); |
|||
}); |
|||
}(jQuery)); |
|||
//]]> |
|||
</script> |
|||
</head> |
|||
{% load i18n %} |
|||
|
|||
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"> |
|||
|
|||
<!-- Container --> |
|||
<div id="container"> |
|||
<div class="container"> |
|||
|
|||
{% if not is_popup %} |
|||
|
|||
{% block container-top %}{% endblock %} |
|||
|
|||
{% if not is_popup %} |
|||
<!-- Header --> |
|||
<div id="header"> |
|||
<div id="branding"> |
|||
{% block branding %}{% endblock %} |
|||
</div> |
|||
{% if user.is_active and user.is_staff %} |
|||
<div id="user-tools"> |
|||
{% trans 'Welcome,' %} |
|||
<strong>{% firstof user.get_short_name user.get_username %}</strong>. |
|||
{% block userlinks %} |
|||
<!-- Header --> |
|||
<div class="navbar navbar-static-top"> |
|||
<div class="navbar-inner"> |
|||
<div class="container"> |
|||
<div class="navbar-header"> |
|||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
{% block branding %}{% endblock %} |
|||
</div> |
|||
<div class="navbar-collapse collapse navbar-right"> |
|||
<ul class="nav navbar-nav"> |
|||
{% if user.is_active and user.is_staff %} |
|||
<li class="dropdown"> |
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans 'Welcome,' %} <strong>{% filter force_escape %}{% firstof user.get_short_name user.get_username user.first_name user.username %}{% endfilter %}</strong> <span class="caret"></span></a> |
|||
<ul class="dropdown-menu"> |
|||
{% if user.has_usable_password %} |
|||
<li><a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a></li> |
|||
{% endif %} |
|||
<li><a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a></li> |
|||
</ul> |
|||
</li> |
|||
{% block languages %} |
|||
<li class="divider-vertical"></li> |
|||
{% language_selector %} |
|||
{% endblock languages %} |
|||
{% block logs %} |
|||
<li class="dropdown" id="recent-actions-module"> |
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans 'Recent Actions' %} <b class="caret"></b></a> |
|||
{% load log %} |
|||
{% get_admin_log 10 as admin_log for_user user %} |
|||
<ul class="dropdown-menu"> |
|||
{% for entry in admin_log %} |
|||
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}"> |
|||
<a href="{% if entry.is_deletion or not entry.get_admin_url %}#{% else %}{{ entry.get_admin_url }}{% endif %}"> |
|||
<i class="icon-{% if entry.is_addition %}plus{% endif %}{% if entry.is_change %}edit{% endif %}{% if entry.is_deletion %}remove{% endif %}"></i> |
|||
{{ entry.object_repr }} |
|||
{% if entry.content_type %} |
|||
<span class="mini quiet">({% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %})</span> |
|||
{% else %} |
|||
<span class="mini quiet">({% trans 'Unknown content' %})</span> |
|||
{% endif %} |
|||
</a> |
|||
</li> |
|||
{% empty %} |
|||
<li class="disabled"><a href="#">{% trans 'None available' %}</a></li> |
|||
{% endfor %} |
|||
</ul> |
|||
</li> |
|||
{% endblock %} |
|||
{% block userlinks %} |
|||
{% url 'django-admindocs-docroot' as docsroot %} |
|||
{% if docsroot %} |
|||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / |
|||
<li class="divider-vertical"></li> |
|||
<li><a href="{{ docsroot }}">{% trans 'Documentation' %}</a></li> |
|||
{% endif %} |
|||
{% if user.has_usable_password %} |
|||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> / |
|||
{% endblock %} |
|||
{% endif %} |
|||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a> |
|||
{% endblock %} |
|||
</div> |
|||
{% endif %} |
|||
{% block nav-global %}{% endblock %} |
|||
</div> |
|||
<!-- END Header --> |
|||
{% block breadcrumbs %} |
|||
<div class="breadcrumbs"> |
|||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> |
|||
{% if title %} › {{ title }}{% endif %} |
|||
{% block nav-global %}{% endblock %} |
|||
</ul> |
|||
</div><!--/.nav-collapse --> |
|||
</div> |
|||
{% endblock %} |
|||
</div> |
|||
</div> |
|||
<!-- END Header --> |
|||
<div role="navigation" class="navbar navbar-default"> |
|||
<div class="container-fluid"> |
|||
<div class="navbar-header"> |
|||
<button data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle collapsed" type="button"> |
|||
<span class="sr-only">Toggle navigation</span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
<span class="icon-bar"></span> |
|||
</button> |
|||
</div> |
|||
<div class="navbar-collapse collapse"> |
|||
{% show_menu "Barra de navegação" "unordered-list" %} |
|||
</div><!--/.nav-collapse --> |
|||
</div><!--/.container-fluid --> |
|||
</div> |
|||
{% endif %} |
|||
|
|||
{% block messages %} |
|||
{% if messages %} |
|||
<ul class="messagelist">{% for message in messages %} |
|||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li> |
|||
{% endfor %}</ul> |
|||
{% endif %} |
|||
{% endblock messages %} |
|||
|
|||
<!-- Content --> |
|||
<div id="content" class="{% block coltype %}colM{% endblock %}"> |
|||
{% block pretitle %}{% endblock %} |
|||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %} |
|||
{% block content %} |
|||
{% block navbar %} |
|||
{% block pretitle %}{% endblock %} |
|||
{% block object-tools %}{% endblock %} |
|||
{{ content }} |
|||
{% endblock %} |
|||
{% endblock navbar %} |
|||
|
|||
{% block messages %} |
|||
{% if messages %} |
|||
<div class="row"> |
|||
<div class="col-sm-12"> |
|||
{% for message in messages %} |
|||
<div class="alert alert-info {% if message.tags %}{{ message.tags }}{% endif %}"> |
|||
{{ message }} |
|||
</div> |
|||
{% endfor %} |
|||
</div> |
|||
</div> |
|||
{% endif %} |
|||
{% endblock messages %} |
|||
|
|||
{% block content %}{{ content }}{% endblock %} |
|||
{% block sidebar %}{% endblock %} |
|||
<br class="clear" /> |
|||
</div> |
|||
<!-- END Content --> |
|||
|
|||
{% block footer %}<div id="footer"></div>{% endblock %} |
|||
{% block footer %}<footer id="footer"></footer>{% endblock %} |
|||
</div> |
|||
<!-- END Container --> |
|||
|
|||
</body> |
|||
</html> |
|||
</html> |
|||
|
@ -0,0 +1,122 @@ |
|||
{% extends "admin/base_site.html" %} |
|||
{% load i18n admin_urls admin_static admin_list bootstrapped_goodies_tags %} |
|||
|
|||
{% block extrastyle %} |
|||
{{ block.super }} |
|||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" /> |
|||
{% if cl.formset %} |
|||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" /> |
|||
{% endif %} |
|||
{% if cl.formset or action_form %} |
|||
{% url 'admin:jsi18n' as jsi18nurl %} |
|||
<script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script> |
|||
{% endif %} |
|||
{{ media.css }} |
|||
{% endblock %} |
|||
|
|||
{% block extrahead %} |
|||
{{ block.super }} |
|||
{{ media.js }} |
|||
{% if action_form %}{% if actions_on_top or actions_on_bottom %} |
|||
<script type="text/javascript"> |
|||
(function($) { |
|||
$(document).ready(function($) { |
|||
$("tr input.action-select").actions(); |
|||
}); |
|||
})(django.jQuery); |
|||
</script> |
|||
{% endif %}{% endif %} |
|||
{% endblock %} |
|||
|
|||
{% block bodyclass %}_change-list{% endblock %} |
|||
|
|||
{% block coltype %}flex{% endblock %} |
|||
|
|||
{% block object-tools %} |
|||
|
|||
<ul class="object-tools pull-left nav nav-pills"> |
|||
{% block object-tools-items %} |
|||
{% if has_add_permission %} |
|||
<li> |
|||
{% url cl.opts|admin_urlname:'add' as add_url %} |
|||
<a href="{% add_preserved_filters add_url is_popup %}"> |
|||
<span class="glyphicon glyphicon-plus"></span> {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} |
|||
</a> |
|||
</li> |
|||
{% endif %} |
|||
{% endblock %} |
|||
</ul> |
|||
|
|||
{% if cl.has_filters %} |
|||
<ul class="nav navbar-nav pull-right"> |
|||
<li class="dropdown"> |
|||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{% trans 'Filter' %} <span class="caret"></span></a> |
|||
<ul class="dropdown-menu pull-right"> |
|||
{% for spec in cl.filter_specs %} |
|||
{% admin_list_filter cl spec %} |
|||
{% endfor %} |
|||
</ul> |
|||
</li> |
|||
</ul> |
|||
{% endif %} |
|||
{% block search %}{% search_form cl %}{% endblock %} |
|||
{% endblock %} |
|||
|
|||
{% block content %} |
|||
<form class="" id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %} |
|||
|
|||
{% if cl.formset.errors %} |
|||
<div class="alert alert-danger"> |
|||
<p class="errornote"> |
|||
{% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} |
|||
</p> |
|||
{{ cl.formset.non_form_errors }} |
|||
</div> |
|||
{% endif %} |
|||
|
|||
|
|||
{% with app_name=cl.opts.module_name|lower|slugify %} |
|||
{% render_with_template_if_exist cl.opts.app_label|lower|add:"/admin_app_"|add:app_name|add:"_description.html" "" %} |
|||
{% endwith %} |
|||
|
|||
{% if action_form and actions_on_top and cl.full_result_count %} |
|||
<div class='pull-right'>{% admin_actions %}</div> |
|||
{% endif %} |
|||
|
|||
<div id="content-main"> |
|||
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="_changelist"> |
|||
{% block date_hierarchy %} |
|||
{% date_hierarchy cl %} |
|||
{% endblock %} |
|||
|
|||
{% if cl.formset %} |
|||
<div>{{ cl.formset.management_form }}</div> |
|||
{% endif %} |
|||
|
|||
{% block result_list %} |
|||
{% result_list cl %} |
|||
{% endblock %} |
|||
</div> |
|||
</div> |
|||
{# {% if cl.formset and cl.result_count %} #} |
|||
<div class="navbar navbar-default"> |
|||
<div class="navbar-inner"> |
|||
<div class="navbar-form pull-left"> |
|||
{% if action_form and actions_on_bottom and cl.full_result_count %} |
|||
{% admin_actions %} |
|||
{% endif %} |
|||
</div> |
|||
<div class="navbar-form pull-right"> |
|||
<input type="submit" name="_save" class="btn btn-primary default" value="{% trans 'Save' %}"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
{# {% endif %} #} |
|||
|
|||
{% block pagination %} |
|||
{% pagination cl %} |
|||
{% endblock %} |
|||
</form> |
|||
{% endblock %} |
|||
|
|||
|
Loading…
Reference in new issue