mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-17 06:30:25 +00:00
Update default theme to a bootstrap3 theme based on http://startbootstrap.com/template-overviews/sb-admin-2/
Resolve #360
This commit is contained in:
parent
f3dc001f3a
commit
bd35ffc676
81 changed files with 2215 additions and 1131 deletions
32
README.rst
32
README.rst
|
|
@ -83,14 +83,19 @@ Add djadmin2 and rest_framework to your settings file:
|
|||
'crispy_forms', # Required for the default theme's layout
|
||||
...
|
||||
)
|
||||
|
||||
Add the default theme in your settings file:
|
||||
|
||||
Add setting for apps and the default theme in your settings file:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
Add djadmin2 urls to your URLconf:
|
||||
|
||||
|
|
@ -136,16 +141,21 @@ How to write django-admin2 modules
|
|||
djadmin2.default.register(Comment)
|
||||
djadmin2.default.register(User, UserAdmin2)
|
||||
|
||||
Migrating from 0.5.x
|
||||
Migrating from 0.6.x
|
||||
====================
|
||||
|
||||
Themes are now defined explicitly, including the default theme. Therefore, your `settings` need to include this:
|
||||
Themes are a new default theme based on bootstrap3 and also some new settings to add. Therefore, your `settings` need to include this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
|
||||
Drop-In Themes
|
||||
|
|
@ -156,8 +166,8 @@ The default theme is whatever bootstrap is most current. Specifically:
|
|||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
If you create a new theme, you define it thus:
|
||||
|
||||
|
|
@ -166,7 +176,7 @@ If you create a new theme, you define it thus:
|
|||
# In settings.py
|
||||
# Mythical theme! This does not exit... YET!
|
||||
INSTALLED_APPS += ('djadmin2theme_foundation',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_foundation/"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_foundation"
|
||||
|
||||
Follows Best Practices
|
||||
======================
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ MODEL_ADMIN_ATTRS = (
|
|||
'get_list_actions', 'get_ordering', 'actions_on_bottom', 'actions_on_top',
|
||||
'ordering', 'save_on_top', 'save_on_bottom', 'readonly_fields', )
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = getattr(settings, "ADMIN2_THEME_DIRECTORY", "djadmin2theme_default")
|
||||
ADMIN2_THEME_DIRECTORY = getattr(settings, "ADMIN2_THEME_DIRECTORY", "djadmin2theme_bootstrap3")
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
/* Fixes a Bootstrap 2.3 bug. This can be removed when upgrading to Bootstrap v3. */
|
||||
|
||||
.text-right
|
||||
{
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.text-center
|
||||
{
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.text-left
|
||||
{
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
/* Custom CSS classes go below this point */
|
||||
|
||||
.checkbox-column {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.space-below {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.history_btn {
|
||||
float: right;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.change_form {
|
||||
border: 1px solid #C6BCBC;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.change_form .controls{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
label {
|
||||
float: left;
|
||||
margin-right : 40px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
|
||||
}
|
||||
|
||||
.comments_form {
|
||||
clear: both;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.control-group {
|
||||
/*margin-bottom: 20px;*/
|
||||
padding-top: 10px;
|
||||
padding-left: 20px;
|
||||
border-bottom: 1px solid #CCCCC1;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 400px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.textarea {
|
||||
width: 800px;
|
||||
}
|
||||
textarea {
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
.add_comment {
|
||||
margin-top: 0;
|
||||
height: 25px;
|
||||
padding: 5px;
|
||||
/*border: 1px solid #CCCCC1;
|
||||
border-radius: 5px;*/
|
||||
}
|
||||
|
||||
|
||||
.save_btns {
|
||||
margin-top: 10px;
|
||||
border: 1px solid #CCCCC1;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
padding-left: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.empty-form {
|
||||
margin: 20px;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,20 +0,0 @@
|
|||
body{
|
||||
margin-top: 100px;
|
||||
}
|
||||
.form-container {
|
||||
float: none;
|
||||
margin: 0 auto;
|
||||
width: 400px;
|
||||
}
|
||||
.login-title{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
body{
|
||||
margin-top: 0px;
|
||||
}
|
||||
.form-container {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -19,15 +19,15 @@ class BooleanRendererTest(TestCase):
|
|||
|
||||
def test_boolean(self):
|
||||
out1 = self.renderer(True, None)
|
||||
self.assertIn('icon-ok-sign', out1)
|
||||
self.assertIn('fa fa-check', out1)
|
||||
out2 = self.renderer(False, None)
|
||||
self.assertIn('icon-minus-sign', out2)
|
||||
self.assertIn('fa fa-minus', out2)
|
||||
|
||||
def test_string(self):
|
||||
out1 = self.renderer('yeah', None)
|
||||
self.assertIn('icon-ok-sign', out1)
|
||||
self.assertIn('fa fa-check', out1)
|
||||
out2 = self.renderer('', None)
|
||||
self.assertIn('icon-minus-sign', out2)
|
||||
self.assertIn('fa fa-minus', out2)
|
||||
|
||||
|
||||
class DatetimeRendererTest(TestCase):
|
||||
|
|
|
|||
|
|
@ -0,0 +1,394 @@
|
|||
body {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid #e7e7e7;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-top-links li:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-top-links li a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a div {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages, .navbar-top-links .dropdown-tasks, .navbar-top-links .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-nav.navbar-collapse {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.sidebar .sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
border-bottom: 1px solid #e7e7e7;
|
||||
}
|
||||
|
||||
.sidebar ul li a.active {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.sidebar .arrow {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar .fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.sidebar .active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li, .sidebar .nav-third-level li {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
|
||||
.sidebar .nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages, .navbar-top-links .dropdown-tasks, .navbar-top-links .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.btn-outline.btn-primary {
|
||||
color: #428bca;
|
||||
}
|
||||
|
||||
.btn-outline.btn-primary:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-success {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.btn-outline.btn-success:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-info {
|
||||
color: #5bc0de;
|
||||
}
|
||||
|
||||
.btn-outline.btn-info:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-warning {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.btn-outline.btn-warning:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.btn-outline.btn-danger {
|
||||
color: #d9534f;
|
||||
}
|
||||
|
||||
.btn-outline.btn-danger:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chat li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted #999999;
|
||||
}
|
||||
|
||||
.chat li.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.chat li.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.chat li .chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon, .chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled {
|
||||
background: 0 0;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50, 50, 50, 0.5);
|
||||
}
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.btn-circle.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.btn-circle.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.show-grid [class^=col-] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
border-color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green .panel-heading {
|
||||
border-color: #5cb85c;
|
||||
color: white;
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green a {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.panel-green a:hover {
|
||||
color: #3d8b3d;
|
||||
}
|
||||
|
||||
.panel-red {
|
||||
border-color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red .panel-heading {
|
||||
border-color: #d9534f;
|
||||
color: white;
|
||||
background-color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red a {
|
||||
color: #d9534f;
|
||||
}
|
||||
|
||||
.panel-red a:hover {
|
||||
color: #b52b27;
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
border-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow .panel-heading {
|
||||
border-color: #f0ad4e;
|
||||
color: white;
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow a {
|
||||
color: #f0ad4e;
|
||||
}
|
||||
|
||||
.panel-yellow a:hover {
|
||||
color: #df8a13;
|
||||
}
|
||||
|
||||
.model-search {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#wrapper.no-sidebar #page-wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#page-wrapper ol.breadcrumb {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#page-wrapper h1.page-header {
|
||||
margin-top: 30px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper ol.breadcrumb {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
/**
|
||||
* Dynamicaly adds button to each input element
|
||||
* Required by filter section to allow form to be submitted
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//Loads the correct sidebar on window load,
|
||||
//collapses the sidebar on window resize.
|
||||
// Sets the min-height of #page-wrapper to window size
|
||||
$(function() {
|
||||
$(window).bind("load resize", function() {
|
||||
topOffset = 50;
|
||||
width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
|
||||
if (width < 768) {
|
||||
$('div.navbar-collapse').addClass('collapse');
|
||||
topOffset = 100; // 2-row-menu
|
||||
} else {
|
||||
$('div.navbar-collapse').removeClass('collapse');
|
||||
}
|
||||
|
||||
height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
|
||||
height = height - topOffset;
|
||||
if (height < 1) height = 1;
|
||||
if (height > topOffset) {
|
||||
$("#page-wrapper").css("min-height", (height) + "px");
|
||||
}
|
||||
});
|
||||
|
||||
var url = window.location;
|
||||
var element = $('ul.nav a').filter(function() {
|
||||
return this.href == url || url.href.indexOf(this.href) == 0;
|
||||
}).addClass('active').parent().parent().addClass('in').parent();
|
||||
if (element.is('li')) {
|
||||
element.addClass('active');
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
@import "sb-admin2/sb-admin-2";
|
||||
|
||||
#wrapper {
|
||||
&.no-sidebar {
|
||||
#page-wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model-search {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1.page-header {
|
||||
margin-top: 30px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
// Mixins
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
@import "variables.less";
|
||||
@import "mixins.less";
|
||||
|
||||
// Global Styles
|
||||
|
||||
body {
|
||||
background-color: @gray-lightest;
|
||||
}
|
||||
|
||||
// Wrappers
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid darken(@gray-lightest, 6.5%);
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
// --Topbar
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.navbar-top-links li:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.navbar-top-links li a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-menu li a div {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
// --Sidebar
|
||||
|
||||
.sidebar {
|
||||
.sidebar-nav.navbar-collapse {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.sidebar ul li {
|
||||
border-bottom: 1px solid darken(@gray-lightest, 6.5%);
|
||||
a {
|
||||
&.active {
|
||||
background-color: @gray-lighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .arrow {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.sidebar .fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.sidebar .active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li,
|
||||
.sidebar .nav-third-level li {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.sidebar .nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
|
||||
.sidebar .nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
|
||||
.navbar-top-links .dropdown-messages,
|
||||
.navbar-top-links .dropdown-tasks,
|
||||
.navbar-top-links .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline {
|
||||
color: @brand-primary;
|
||||
}
|
||||
|
||||
.btn-success.btn-outline {
|
||||
color: @brand-success;
|
||||
}
|
||||
|
||||
.btn-info.btn-outline {
|
||||
color: @brand-info;
|
||||
}
|
||||
|
||||
.btn-warning.btn-outline {
|
||||
color: @brand-warning;
|
||||
}
|
||||
|
||||
.btn-danger.btn-outline {
|
||||
color: @brand-danger;
|
||||
}
|
||||
|
||||
.btn-primary.btn-outline:hover,
|
||||
.btn-success.btn-outline:hover,
|
||||
.btn-info.btn-outline:hover,
|
||||
.btn-warning.btn-outline:hover,
|
||||
.btn-danger.btn-outline:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
// Chat Widget
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.chat li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted @gray-light;
|
||||
}
|
||||
|
||||
.chat li.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
.chat li.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.chat li .chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon,
|
||||
.chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
// Login Page
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
// Flot Charts Containers
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
// DataTables Overrides
|
||||
|
||||
table.dataTable thead .sorting,
|
||||
table.dataTable thead .sorting_asc,
|
||||
table.dataTable thead .sorting_desc,
|
||||
table.dataTable thead .sorting_asc_disabled,
|
||||
table.dataTable thead .sorting_desc_disabled {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
|
||||
table.dataTable thead .sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50,50,50,.5);
|
||||
}
|
||||
|
||||
// Circle Buttons
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
}
|
||||
|
||||
.btn-circle.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.btn-circle.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
// Grid Demo Elements
|
||||
|
||||
.show-grid [class^="col-"] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
// Custom Colored Panels
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
border-color: @brand-success;
|
||||
.panel-heading {
|
||||
border-color: @brand-success;
|
||||
color: white;
|
||||
background-color: @brand-success;
|
||||
}
|
||||
a {
|
||||
color: @brand-success;
|
||||
&:hover {
|
||||
color: darken(@brand-success, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-red {
|
||||
border-color: @brand-danger;
|
||||
.panel-heading {
|
||||
border-color: @brand-danger;
|
||||
color: white;
|
||||
background-color: @brand-danger;
|
||||
}
|
||||
a {
|
||||
color: @brand-danger;
|
||||
&:hover {
|
||||
color: darken(@brand-danger, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
border-color: @brand-warning;
|
||||
.panel-heading {
|
||||
border-color: @brand-warning;
|
||||
color: white;
|
||||
background-color: @brand-warning;
|
||||
}
|
||||
a {
|
||||
color: @brand-warning;
|
||||
&:hover {
|
||||
color: darken(@brand-warning, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
// Variables
|
||||
|
||||
@gray-darker: lighten(#000, 13.5%);
|
||||
@gray-dark: lighten(#000, 20%);
|
||||
@gray: lighten(#000, 33.5%);
|
||||
@gray-light: lighten(#000, 60%);
|
||||
@gray-lighter: lighten(#000, 93.5%);
|
||||
@gray-lightest: lighten(#000, 97.25%);
|
||||
@brand-primary: #428bca;
|
||||
@brand-success: #5cb85c;
|
||||
@brand-info: #5bc0de;
|
||||
@brand-warning: #f0ad4e;
|
||||
@brand-danger: #d9534f;
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
$gray-darker: lighten(#000, 13.5%);
|
||||
$gray-dark: lighten(#000, 20%);
|
||||
$gray: lighten(#000, 33.5%);
|
||||
$gray-light: lighten(#000, 60%);
|
||||
$gray-lighter: lighten(#000, 93.5%);
|
||||
$gray-lightest: lighten(#000, 97.25%);
|
||||
$brand-primary: #428bca;
|
||||
$brand-success: #5cb85c;
|
||||
$brand-info: #5bc0de;
|
||||
$brand-warning: #f0ad4e;
|
||||
$brand-danger: #d9534f;
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
@import "variables";
|
||||
@import "sb-admin2/sb-admin2";
|
||||
|
||||
.model-search {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sort_link {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sort_link:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous-link a {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.date-drilldown {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
&.no-sidebar {
|
||||
#page-wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1.page-header {
|
||||
margin-top: 30px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
ol.breadcrumb {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
$gray-darker: lighten(#000, 13.5%) !default;
|
||||
$gray-dark: lighten(#000, 20%) !default;
|
||||
$gray: lighten(#000, 33.5%) !default;
|
||||
$gray-light: lighten(#000, 60%) !default;
|
||||
$gray-lighter: lighten(#000, 93.5%) !default;
|
||||
$gray-lightest: lighten(#000, 97.25%) !default;
|
||||
$brand-primary: #428bca !default;
|
||||
$brand-success: #5cb85c !default;
|
||||
$brand-info: #5bc0de !default;
|
||||
$brand-warning: #f0ad4e !default;
|
||||
$brand-danger: #d9534f !default;
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
@mixin btn-outline($color, $hover-color: #FFF) {
|
||||
color: $color;
|
||||
&:hover {
|
||||
color: $hover-color;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
@mixin panel-color($color) {
|
||||
border-color: $color;
|
||||
.panel-heading {
|
||||
border-color: $color;
|
||||
color: white;
|
||||
background-color: $color;
|
||||
}
|
||||
a {
|
||||
color: $color;
|
||||
&:hover {
|
||||
color: darken($color, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,262 @@
|
|||
@import "variables";
|
||||
|
||||
@import "mixins/btn-outline";
|
||||
@import "mixins/panel";
|
||||
|
||||
body {
|
||||
background-color: $gray-lightest;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#page-wrapper {
|
||||
padding: 0 15px;
|
||||
min-height: 568px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
#page-wrapper {
|
||||
position: inherit;
|
||||
margin: 0 0 0 250px;
|
||||
padding: 0 30px;
|
||||
border-left: 1px solid darken($gray-lightest, 6.5%);
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-top-links {
|
||||
margin-right: 0;
|
||||
li {
|
||||
display: inline-block;
|
||||
&:last-child {
|
||||
margin-right: 15px;
|
||||
}
|
||||
a {
|
||||
padding: 15px;
|
||||
min-height: 50px;
|
||||
}
|
||||
}
|
||||
.dropdown-menu li {
|
||||
display: block;
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
a {
|
||||
padding: 3px 20px;
|
||||
min-height: 0;
|
||||
div {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dropdown-messages, .dropdown-tasks, .dropdown-alerts {
|
||||
width: 310px;
|
||||
min-width: 0;
|
||||
}
|
||||
.dropdown-messages {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.dropdown-tasks {
|
||||
margin-left: -59px;
|
||||
}
|
||||
.dropdown-alerts {
|
||||
margin-left: -123px;
|
||||
}
|
||||
.dropdown-user {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
.sidebar-nav.navbar-collapse {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
.sidebar-search {
|
||||
padding: 15px;
|
||||
}
|
||||
ul li {
|
||||
border-bottom: 1px solid darken($gray-lightest, 6.5%);
|
||||
a.active {
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
}
|
||||
.arrow {
|
||||
float: right;
|
||||
}
|
||||
.fa.arrow:before {
|
||||
content: "\f104";
|
||||
}
|
||||
.active > a > .fa.arrow:before {
|
||||
content: "\f107";
|
||||
}
|
||||
.nav-second-level li, .nav-third-level li {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
.nav-second-level li a {
|
||||
padding-left: 37px;
|
||||
}
|
||||
.nav-third-level li a {
|
||||
padding-left: 52px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 250px;
|
||||
margin-top: 51px;
|
||||
}
|
||||
.navbar-top-links {
|
||||
.dropdown-messages, .dropdown-tasks, .dropdown-alerts {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
color: inherit;
|
||||
background-color: transparent;
|
||||
transition: all .5s;
|
||||
&.btn-primary {
|
||||
@include btn-outline($brand-primary);
|
||||
}
|
||||
&.btn-success {
|
||||
@include btn-outline($brand-success);
|
||||
}
|
||||
&.btn-info {
|
||||
@include btn-outline($brand-info);
|
||||
}
|
||||
&.btn-warning {
|
||||
@include btn-outline($brand-warning);
|
||||
}
|
||||
&.btn-danger {
|
||||
@include btn-outline($brand-danger);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.chat {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
li {
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted $gray-light;
|
||||
&.left .chat-body {
|
||||
margin-left: 60px;
|
||||
}
|
||||
&.right .chat-body {
|
||||
margin-right: 60px;
|
||||
}
|
||||
.chat-body p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.panel .slidedown .glyphicon, .chat .glyphicon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.chat-panel .panel-body {
|
||||
height: 350px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
margin-top: 25%;
|
||||
}
|
||||
|
||||
.flot-chart {
|
||||
display: block;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.flot-chart-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
table.dataTable thead {
|
||||
.sorting, .sorting_asc, .sorting_desc, .sorting_asc_disabled, .sorting_desc_disabled {
|
||||
background: 0 0;
|
||||
}
|
||||
.sorting_asc:after {
|
||||
content: "\f0de";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
.sorting_desc:after {
|
||||
content: "\f0dd";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
}
|
||||
.sorting:after {
|
||||
content: "\f0dc";
|
||||
float: right;
|
||||
font-family: fontawesome;
|
||||
color: rgba(50, 50, 50, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.btn-circle {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
padding: 6px 0;
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
line-height: 1.428571429;
|
||||
&.btn-lg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 25px;
|
||||
font-size: 18px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
&.btn-xl {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
padding: 10px 16px;
|
||||
border-radius: 35px;
|
||||
font-size: 24px;
|
||||
line-height: 1.33;
|
||||
}
|
||||
}
|
||||
|
||||
.show-grid {
|
||||
[class^=col-] {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #eee !important;
|
||||
}
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.huge {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.panel-green {
|
||||
@include panel-color($brand-success);
|
||||
}
|
||||
.panel-red {
|
||||
@include panel-color($brand-danger);
|
||||
}
|
||||
|
||||
.panel-yellow {
|
||||
@include panel-color($brand-warning);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "Are you sure?" %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
</li>
|
||||
<li class="active">{% trans "Delete" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
{% blocktrans with objects_name=objects_name count counter=deletable_objects|length %}Are you sure you want to delete the selected {{ objects_name }}? The following item will be deleted:
|
||||
{% plural %}Are you sure you want to delete the selected {{ objects_name }}? The following items will be deleted:
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="confirmed" value="yes"/>
|
||||
<input type="hidden" name="action" value="DeleteSelectedAction"/>
|
||||
{% for item in queryset %}
|
||||
<input type="hidden" name="selected_model_pk" value="{{ item.pk }}"/>
|
||||
{% endfor %}
|
||||
<button class="btn btn-sm btn-danger" type="submit">{% trans "Yes, I'm sure" %}</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
{% with app_verbose_names|verbose_name_for:app_label as verbose_name %}
|
||||
{% firstof verbose_name app_label|title %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block page_title %}{% blocktrans with app_label=app_label|title %}{{ app_label }} administration
|
||||
{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
{% include 'djadmin2theme_bootstrap3/includes/app_model_list.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n staticfiles admin2_tags crispy_forms_tags %}
|
||||
|
||||
{% block navbar %}{% endblock navbar %}
|
||||
{% block breacrumbs %}{% endblock breacrumbs %}
|
||||
|
||||
{% block page_header %}{% endblock page_header %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="login-panel panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% trans "Site administration" %} - {% trans "Log in" %}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form method="post" class="">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="hidden" name="this_is_the_login_form" value="1"/>
|
||||
<input type="hidden" name="next" value="{{ next }}"/>
|
||||
<button class="btn btn-lg btn-success btn-block" type="submit">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,21 +1,14 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "Log out" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
|
||||
<p><a href="{% url 'admin2:dashboard' %}">{% trans 'Log in again' %}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block title %}{% trans 'Password change successful' %}{% endblock title %}
|
||||
{% block page_title %}{% trans 'Password change successful' %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li class="active">{% trans "Password change successful" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags crispy_forms_tags %}
|
||||
|
||||
{% block page_title %}{% trans "Password change" %}: {{ form.user }}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li class="active">{% trans "Password change" %} {{ form.user }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="error-note">
|
||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}
|
||||
Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button class="btn btn-sm btn-success" type="submit" name="_save">{% trans "Change my password" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
{% load i18n %}{% load staticfiles %}<!DOCTYPE html>
|
||||
<html lang="{{ request.LANGUAGE_CODE }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}{% trans "Site administration" %}{% endblock title %} | django-admin2</title>
|
||||
{% block css %}
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
|
||||
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"
|
||||
integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r"
|
||||
crossorigin="anonymous">
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"
|
||||
integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1"
|
||||
crossorigin="anonymous">
|
||||
<link href="{% static "djadmin2theme_bootstrap3/css/base.css" %}" rel="stylesheet" media="screen">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{% endblock css %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper" class="{% block wrapper_class %}no-sidebar{% endblock wrapper_class %}">
|
||||
{% block navbar %}
|
||||
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">{% trans "Toggle navigation" %}</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{% url 'admin2:dashboard' %}">Django-Admin2</a>
|
||||
</div>
|
||||
|
||||
<ul class="nav navbar-top-links navbar-right">
|
||||
<li><a tabindex="2" href="{% url 'admin2:api_index' %}">{% trans "API" %}</a></li>
|
||||
|
||||
{% if docsroot %}
|
||||
<li><a tabindex="3" href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
{% if user.get_full_name %}
|
||||
{{ user.get_full_name }}
|
||||
{% else %}
|
||||
{% blocktrans with user=user.username %}Logged in as {{ user }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
<i class="fa fa-caret-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-user">
|
||||
{% if user.has_usable_password %}
|
||||
<li>
|
||||
<a href="{% url 'admin2:password_change' user.id %}">
|
||||
<i class="fa fa-gear fa-fw"></i> {% trans "Change password" %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{% url 'admin2:logout' %}">
|
||||
<i class="fa fa-sign-out fa-fw"></i> {% trans "Log out" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% block sidebar %}{% endblock sidebar %}
|
||||
</nav>
|
||||
{% endblock navbar %}
|
||||
|
||||
<div{% block page_wrapper_attrs %} id="page-wrapper"{% endblock %}>
|
||||
{% block breacrumbs %}
|
||||
<div class="row">
|
||||
<ol class="breadcrumb">
|
||||
{% block breadcrumbs %}
|
||||
<li class="active">{% trans "Home" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
</ol>
|
||||
</div>
|
||||
{% endblock breacrumbs %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{% block page_header %}
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<h1 class="page-header">
|
||||
{% block page_title %}{% trans "Site administration" %}{% endblock page_title %}{% block page_title_link %}{% endblock page_title_link %}
|
||||
</h1>
|
||||
{% endblock page_header %}
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block javascript %}
|
||||
<script src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
|
||||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="{% static "djadmin2theme_bootstrap3/js/sb-admin-2.js" %}"></script>
|
||||
<script src="{% static "djadmin2theme_bootstrap3/js/base.js" %}"></script>
|
||||
{% endblock javascript %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{% load i18n admin2_tags crispy_forms_tags %}
|
||||
|
||||
{% for inline_form in formset %}
|
||||
<div class="change_form space-below">
|
||||
{{ inline_form|crispy }}
|
||||
{% if not inline_form.visible_fields %}
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
{% load i18n admin2_tags %}
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for field in formset|formset_visible_fieldlist %}
|
||||
<th>{{ field }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inline_form in formset %}
|
||||
<tr>
|
||||
{% for field in inline_form.visible_fields %}
|
||||
<td>
|
||||
{% if forloop.first %}
|
||||
{% for hidden_field in inline_form.hidden_fields %}
|
||||
{{ hidden_field }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ field }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% if not inline_form.visible_fields %}
|
||||
<td>
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="new_row">
|
||||
<td colspan="3">
|
||||
<div class="add_comment">
|
||||
<a href="#" class="btn btn-sm btn-default">
|
||||
<i class="fa fa-plus"></i> {% trans "Add another comment" %}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{% load i18n admin2_tags %}
|
||||
|
||||
<table class="table table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<a href="{% url 'admin2:app_index' app_label=app_label %}">
|
||||
{% with app_verbose_names|verbose_name_for:app_label as verbose_name %}
|
||||
{% firstof verbose_name app_label|title %}
|
||||
{% endwith %}
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for model_class, model_admin in registry.items %}
|
||||
{% with permissions|for_admin:model_admin as permissions %}
|
||||
{% if permissions.has_view_permission or permissions.has_add_permission or permissions.has_change_permission %}
|
||||
<tr>
|
||||
<td width="40%">
|
||||
{% if permissions.has_view_permission %}
|
||||
<a href="{{ model_admin.get_index_url }}">
|
||||
{% endif %}
|
||||
{{ model_admin.verbose_name_plural|title }}
|
||||
{% if permissions.has_view_permission %}</a>{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url model_admin|admin2_urlname:'create' %}">
|
||||
<i class="fa fa-plus"></i> {% trans "Add" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{{ model_admin.get_index_url }}">
|
||||
<i class="fa fa-pencil"></i> {% trans "Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% if actions %}
|
||||
<ol class="unstyled">
|
||||
{% for action in actions %}
|
||||
<li>
|
||||
{% if action.is_addition %}<i class="added fa fa-plus"></i>
|
||||
{% elif action.is_change %}<i class="changed fa fa-pencil"></i>
|
||||
{% else %}<i class="deleted fa fa-minus"></i>
|
||||
{% endif %} {{ action }}
|
||||
<span class="muted">{{ action.content_type.model }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<p>{% trans "None available" %}</p>
|
||||
{% endif %}
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{% load i18n admin2_tags %}
|
||||
|
||||
<div class="navbar actions-{{ position }}">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{% trans "Actions" %} <span class="fa fa-caret-down"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for action in actions %}
|
||||
<li>
|
||||
<a tabindex="-1" href="#" data-name="action" data-value="{{ action.name }}">
|
||||
{{ action.description }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<input type="hidden" name="action" value=""/>
|
||||
<small class="muted">
|
||||
{% if view.model_admin.actions_selection_counter %}
|
||||
{% blocktrans with selected='<span class="selected-count">0</span>' total=object_list|length %}{{ selected }} of {{ total }} selected{% endblocktrans %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<div class="pull-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url view|admin2_urlname:'create' %}" class="btn btn-default">
|
||||
<i class="fa fa-plus"></i> {% blocktrans with model_verbose_name=model|model_verbose_name %}Add {{ model_verbose_name }}{% endblocktrans %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="pagination pagination-{{ position }}">
|
||||
<ul>
|
||||
<li class="{% if not page_obj.has_previous %}disabled{% endif %}">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page={{ page_obj.previous_page_number }}">
|
||||
{% trans "Prev" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a>
|
||||
{% trans "Prev" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="active">
|
||||
<a>{{ page_obj }}</a>
|
||||
</li>
|
||||
<li class="{% if not page_obj.has_next %}disabled{% endif %}">
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}">
|
||||
{% trans "Next" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a>
|
||||
{% trans "Next" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
{% load i18n admin2_tags %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 save_btns">
|
||||
{% if object %}
|
||||
<a class="btn btn-sm btn-danger" href="{% url view|admin2_urlname:'delete' pk=object.pk %}">
|
||||
<i class="fa fa-remove"></i> {% trans "Delete" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-sm btn-default" type="submit" name="_addanother">
|
||||
{% trans "Save and add another" %}
|
||||
</button>
|
||||
<button class="btn btn-sm btn-default" type="submit" name="_continue">
|
||||
{% trans "Save and continue editing" %}
|
||||
</button>
|
||||
<button class="btn btn-sm btn-success" type="submit" name="_save">
|
||||
{% trans "Save" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block breacrumbs %}{% endblock breacrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
{% for app_label, registry in apps.items %}
|
||||
{% include 'djadmin2theme_bootstrap3/includes/app_model_list.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{% trans "Recent Actions" %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>{% trans "My Actions" %}</p>
|
||||
{% action_history %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "Are you sure?" %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="active">{% trans "Delete" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
{# Translators : this is singular, example : delete the post "My Title" #}
|
||||
{% blocktrans with model_name=model_name object=object %}
|
||||
Are you sure you want to delete the {{ model_name }} "{{ object }}"?
|
||||
{% endblocktrans %}
|
||||
|
||||
{% blocktrans count counter=deletable_objects|length %}
|
||||
The following item will be deleted:
|
||||
{% plural %}
|
||||
All of the following items will be deleted:
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-sm btn-danger" type="submit">
|
||||
{% trans "Yes, I'm sure" %}
|
||||
</button>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block title %}{{ object }}{% endblock title %}
|
||||
|
||||
{% block page_title %}{{ object }}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
</li>
|
||||
<li class="active">{{ object }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
{{ object }}
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n admin2_tags %}
|
||||
|
||||
{% block title %}{% trans "History for" %} {{ object }}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "History for" %} {{ object }}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
</li>
|
||||
<li class="active">{% trans "History" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
{% blocktrans with object=object %}History for {{ object }}{% endblocktrans %}
|
||||
|
||||
{% if object_list %}
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Date/Time" %}</th>
|
||||
<th>{% trans "User" %}</th>
|
||||
<th>{% trans "Action" %}</th>
|
||||
<th>{% trans "Message" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in object_list %}
|
||||
<tr>
|
||||
<td>{{ log.action_time }}</td>
|
||||
<td>{{ log.user }}</td>
|
||||
<td>{{ log.action_type|capfirst }}</td>
|
||||
<td>{{ log.change_message }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>{% trans "No history for this object." %}</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n staticfiles admin2_tags %}
|
||||
|
||||
{% block title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block javascript %}{{ block.super }}
|
||||
<script src="{% static "djadmin2theme_bootstrap3/js/actions.js" %}"></script>
|
||||
{% endblock javascript %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
</li>
|
||||
<li class="active">{{ model_name_pluralized|title }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
{% if search_fields %}
|
||||
<div class="row model-search">
|
||||
<div class="col-md-12">
|
||||
<form method="get" class="form-inline form-search" role="search">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="{% trans 'Search Term' %}" name="q" value="{{ search_term }}">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button"><i class="fa fa-search"></i> {% trans "Search" %}</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="model-list" class="row">
|
||||
<form id="model-list-form" class="form-inline" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="col-md-8">
|
||||
{% if dates %}
|
||||
<ul class="date-drilldown nav well nav-pills">
|
||||
{% if previous_date %}
|
||||
<li class="previous-link">
|
||||
<a href="{{ previous_date.link|safe }}">
|
||||
{{ previous_date.text|safe }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for link, date in dates %}
|
||||
<li class="{% ifequal active_day date %}active{% endifequal %}">
|
||||
<a href="{{ link|safe }}">{{ date }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if view.model_admin.actions_on_top %}
|
||||
{% include 'djadmin2theme_bootstrap3/includes/list_actions.html' with position='top' %}
|
||||
{% endif %}
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th class="checkbox-column"><input type="checkbox" class="model-select-all"></th>
|
||||
{% for attr in view.model_admin.list_display %}
|
||||
<th>
|
||||
{# comment if we sorted on this field last time invert the sort #}
|
||||
{% if sort_term == attr %}
|
||||
<a class='sort_link' href='./?sort=-{{ attr }}'>
|
||||
{% else %}
|
||||
<a class='sort_link' href='./?sort={{ attr }}'>
|
||||
{% endif %}
|
||||
|
||||
{% if forloop.first and attr == "__str__" %}
|
||||
{{ model_name|capfirst }}
|
||||
{% else %}
|
||||
{{ model|model_attr_verbose_name:attr|capfirst }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in object_list %}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="model-select" name="selected_model_pk" value="{{ obj.pk }}">
|
||||
</td>
|
||||
{% for attr in view.model_admin.list_display %}
|
||||
<td>
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{% url view|admin2_urlname:'update' pk=obj.pk %}">{% render obj attr %}</a>
|
||||
{% else %}
|
||||
{% if permissions.has_view_permission %}
|
||||
<a href="{% url view|admin2_urlname:'detail' pk=obj.pk %}">{% render obj attr %}</a>
|
||||
{% else %}
|
||||
{% render obj attr %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if view.model_admin.actions_on_bottom %}
|
||||
{% include 'djadmin2theme_bootstrap3/includes/list_actions.html' with position='bottom' %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_paginated %}
|
||||
{% include 'djadmin2theme_bootstrap3/includes/pagination.html' with position='centered' %}
|
||||
{% endif %}
|
||||
<div>
|
||||
{{ object_list|length }} {{ model_name_pluralized }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% block filters %}
|
||||
<div id="list_filter_container" class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{# Translators : action verb #}{% trans "Filter" %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if list_filter %}
|
||||
<form id='filter_form' class="form-search">
|
||||
{{ list_filter.form.as_p }}
|
||||
</form>
|
||||
{% else %}
|
||||
<a href='./'>{% trans "Reset Filter" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock filters %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
|
||||
{% load i18n admin2_tags crispy_forms_tags %}
|
||||
|
||||
{# Translators : examples : Add post, Change object #}
|
||||
{% block title %}{% blocktrans with action=action model_name=model_name %}{{ action_name }} {{ model_name }}
|
||||
{% endblocktrans %}{% endblock title %}
|
||||
|
||||
{# Translators : examples : Add post, Change object #}
|
||||
{% block page_title %}{% blocktrans with action=action model_name=model_name %}{{ action_name }} {{ model_name }}
|
||||
{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block page_title_link %}
|
||||
{% if object.pk %}
|
||||
<a href="{% url view|admin2_urlname:"history" pk=object.pk %}" class="btn btn-sm btn-info pull-right">{% trans "History" %}</a>
|
||||
{% endif %}
|
||||
{% endblock page_title_link %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
|
||||
</li>
|
||||
{% if action == 'Add' %}
|
||||
<li class="active">{{ action_name }}</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
|
||||
</li>
|
||||
<li class="active">{% trans 'Change' %}</li>
|
||||
{% endif %}
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<form method="post" {% if form.is_multipart %}enctype="multipart/form-data" {% endif %}>
|
||||
<div class="panel panel-default">
|
||||
{% if view.model_admin.save_on_top %}
|
||||
<div class="panel-heading">
|
||||
{% include "djadmin2theme_bootstrap3/includes/save_buttons.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="change_form">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{% if not form.visible_fields %}
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% for formset in inlines %}
|
||||
</div>
|
||||
<div class="comments_form">
|
||||
<h4>{{ formset.model|model_verbose_name_plural|capfirst }}</h4>
|
||||
{{ formset.management_form }}
|
||||
{% include formset.template %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if view.model_admin.save_on_bottom %}
|
||||
<div class="panel-footer">
|
||||
{% include "djadmin2theme_bootstrap3/includes/save_buttons.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{% if value %}
|
||||
<i class="fa fa-check" title="True"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-minus" title="False"></i>
|
||||
{% endif %}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "Are you sure?" %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "Delete" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>{% blocktrans with objects_name=objects_name count counter=deletable_objects|length %}
|
||||
Are you sure you want to delete the selected {{ objects_name }}? The following item will be deleted:
|
||||
{% plural %}
|
||||
Are you sure you want to delete the selected {{ objects_name }}? The following items will be deleted:
|
||||
{% endblocktrans %}</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="confirmed" value="yes" />
|
||||
<input type="hidden" name="action" value="DeleteSelectedAction" />
|
||||
{% for item in queryset %}
|
||||
<input type="hidden" name="selected_model_pk" value="{{ item.pk }}" />
|
||||
{% endfor %}
|
||||
<button class="btn btn-small btn-danger" type="submit">{% trans "Yes, I'm sure" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">
|
||||
{% with app_verbose_names|verbose_name_for:app_label as verbose_name %}
|
||||
{% firstof verbose_name app_label|title %}
|
||||
{% endwith %}
|
||||
</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block page_title %}{% blocktrans with app_label=app_label|title %}{{ app_label }} administration{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span7">
|
||||
{% include 'djadmin2theme_default/includes/app_model_list.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link href="{% static "themes/bootstrap/css/login.css" %}" rel="stylesheet" media="screen">
|
||||
{% endblock css %}
|
||||
|
||||
{% block navbar %}{% endblock navbar %}
|
||||
{% block breacrumbs %}{% endblock breacrumbs %}
|
||||
|
||||
{% block class_page_title %}span12 login-title{% endblock class_page_title %}
|
||||
{% block page_title %}{% trans "Site administration" %} - {% trans "Log in" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="well form-container">
|
||||
<form method="post" class="">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
|
||||
<p class="alert alert-error fade in">
|
||||
<button data-dismiss="alert" class="close" type="button">×</button>
|
||||
{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if form.non_field_errors or form.this_is_the_login_form.errors %}
|
||||
{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %}
|
||||
<p class="alert alert-error fade in">
|
||||
<a href="#" data-dismiss="alert" class="close">×</a>
|
||||
{{ error }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="control-group {% if form.username.errors %}error{% endif %}">
|
||||
<label for="id_{{ form.username.html_name }}" class="control-label">{{ form.username.label }}: </label>
|
||||
<input type="text" class="span12" name="{{ form.username.html_name }}" id="id_{{ form.username.html_name }}" class=" focused" value="{% firstof form.username.value "" %}">
|
||||
</div>
|
||||
<div class="control-group {% if form.password.errors %}error{% endif %}">
|
||||
<label for="id_{{ form.password.html_name }}" class="control-label">{{ form.password.label }}: </label>
|
||||
<input type="password" class="span12" name="{{ form.password.html_name }}" id="id_{{ form.password.html_name }}" value="">
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="this_is_the_login_form" value="1" />
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<button class="btn btn-small btn-primary pull-right" type="submit">
|
||||
{% trans "Log in" %}
|
||||
</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block title %}{% trans 'Password change successful' %}{% endblock title %}
|
||||
{% block page_title %}{% trans 'Password change successful' %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "Password change successful" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load admin2_tags %}
|
||||
|
||||
{% block page_title %}{% trans "Password change" %}: {{ form.user }}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "Password change" %} <span class="divider">/</span></li>
|
||||
<li class="active">{{ form.user }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="error-note">
|
||||
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-small btn-success" type="submit" name="_save">{% trans "Change my password" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
{% load i18n %}{% load staticfiles %}<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>{% block title %}{% trans "Site administration" %}{% endblock title %} | django-admin2</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- Bootstrap -->
|
||||
{% block css %}
|
||||
<link href="{% static "themes/bootstrap/css/bootstrap.min.css" %}" rel="stylesheet" media="screen">
|
||||
<link href="{% static "themes/bootstrap/css/bootstrap-custom.css" %}" rel="stylesheet" media="screen">
|
||||
<link href="{% static "themes/bootstrap/css/base.css" %}" rel="stylesheet" media="screen">
|
||||
{% endblock css %}
|
||||
</head>
|
||||
<body>
|
||||
{% block navbar %}
|
||||
<div class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<a tabindex="1" class="brand" href="{% url 'admin2:dashboard' %}">Django-Admin2</a>
|
||||
|
||||
<ul class="nav pull-right">
|
||||
<li><a tabindex="2" href="{% url 'admin2:api_index' %}">{% trans "API" %}</a></li>
|
||||
|
||||
{% if docsroot %}
|
||||
<li><a tabindex="3" href="{{ docsroot }}">{% trans 'Documentation' %}</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<li class="dropdown">
|
||||
<a tabindex="4" href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
{% if user.get_full_name %}
|
||||
{{ user.get_full_name }}
|
||||
{% else %}
|
||||
{% blocktrans with user=user.username %}Logged in as {{ user }}{% endblocktrans %}
|
||||
{% endif %}
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
{% if user.has_usable_password %}
|
||||
<li><a href="{% url 'admin2:password_change' user.id %}">{% trans "Change password" %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% url 'admin2:logout' %}">{% trans "Log out" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock navbar %}
|
||||
|
||||
{% block breacrumbs %}
|
||||
<ul class="breadcrumb">
|
||||
{% block breadcrumbs %}
|
||||
<li class="active">{% trans "Home" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
</ul>
|
||||
{% endblock breacrumbs %}
|
||||
|
||||
{% if messages %}
|
||||
<ul class="messages">
|
||||
{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="{% block class_page_title %}span10{% endblock class_page_title %}">
|
||||
<h3>{% block page_title %}{% trans "Site administration" %}{% endblock page_title %}</h3>
|
||||
</div>
|
||||
<div class="span2">{% block page_title_link %}{% endblock page_title_link %}</div>
|
||||
</div>
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
|
||||
{% block javascript %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{% static "themes/bootstrap/js/jquery.min.js" %}">\x3C/script>')</script>
|
||||
<script src="{% static "themes/bootstrap/js/bootstrap.min.js" %}"></script>
|
||||
<script src="{% static "themes/bootstrap/js/base.js" %}"></script>
|
||||
{% endblock javascript %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{% load admin2_tags crispy_forms_tags i18n %}
|
||||
|
||||
{% for inline_form in formset %}
|
||||
<div class="change_form space-below">
|
||||
{{ inline_form|crispy }}
|
||||
{% if not inline_form.visible_fields %}
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
{% load admin2_tags i18n %}
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for field in formset|formset_visible_fieldlist %}
|
||||
<th>{{ field }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inline_form in formset %}
|
||||
<tr>
|
||||
{% for field in inline_form.visible_fields %}
|
||||
<td>
|
||||
{% if forloop.first %}
|
||||
{% for hidden_field in inline_form.hidden_fields %}
|
||||
{{ hidden_field }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ field }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
{% if not inline_form.visible_fields %}
|
||||
<td>
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="new_row">
|
||||
<td colspan="3">
|
||||
<div class="add_comment">
|
||||
<a href="#" class="btn btn-small">
|
||||
<i class="icon-plus"></i>
|
||||
Add another comment
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
{% load i18n admin2_tags %}
|
||||
<table class="table table-bordered table-condensed">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">
|
||||
<a href="{% url 'admin2:app_index' app_label=app_label %}">
|
||||
{% with app_verbose_names|verbose_name_for:app_label as verbose_name %}
|
||||
{% firstof verbose_name app_label|title %}
|
||||
{% endwith %}
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for model_class, model_admin in registry.items %}
|
||||
{% with permissions|for_admin:model_admin as permissions %}
|
||||
{% if permissions.has_view_permission or permissions.has_add_permission or permissions.has_change_permission %}
|
||||
<tr>
|
||||
<td width="40%">
|
||||
{% if permissions.has_view_permission %}
|
||||
<a href="{{ model_admin.get_index_url }}">
|
||||
{% endif %}
|
||||
{{ model_admin.verbose_name_plural|title }}
|
||||
{% if permissions.has_view_permission %}</a>{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url model_admin|admin2_urlname:'create' %}">
|
||||
<i class="icon-plus"></i>
|
||||
{% trans "Add" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{{ model_admin.get_index_url }}">
|
||||
<i class="icon-pencil"></i>
|
||||
{% trans "Change" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{% if actions %}
|
||||
<ol class="unstyled">
|
||||
{% for action in actions %}
|
||||
<li>
|
||||
{% if action.is_addition %}
|
||||
<i class="added icon-plus"></i>
|
||||
{% elif action.is_change %}
|
||||
<i class="changed icon-pencil"></i>
|
||||
{% else %}
|
||||
<i class="deleted icon-minus"></i>
|
||||
{% endif %}
|
||||
{{ action }}
|
||||
<span class="muted">{{ action.content_type.model }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% else %}
|
||||
<p>None available</p>
|
||||
{% endif %}
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{% load admin2_tags i18n %}
|
||||
|
||||
<div class="navbar actions-{{ position }}">
|
||||
<div class="btn-group">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
Actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for action in actions %}
|
||||
<li><a tabindex="-1" href="#" data-name="action" data-value="{{ action.name }}">{{ action.description }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="" />
|
||||
<small class="muted">
|
||||
{% if view.model_admin.actions_selection_counter %}
|
||||
{% blocktrans with selected='<span class="selected-count">0</span>' total=object_list|length %}{{selected}} of {{total}} selected{% endblocktrans %}
|
||||
{% endif %}
|
||||
</small>
|
||||
<div class="pull-right">
|
||||
{% if permissions.has_add_permission %}
|
||||
<a href="{% url view|admin2_urlname:'create' %}" class="btn"><i class="icon-plus"></i> {% blocktrans with model_verbose_name=model|model_verbose_name %}Add {{ model_verbose_name }}{% endblocktrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<div class="pagination pagination-{{ position }}">
|
||||
<ul>
|
||||
<li class="{% if not page_obj.has_previous %}disabled{% endif %}">
|
||||
{% if page_obj.has_previous %}
|
||||
<a href="?page={{ page_obj.previous_page_number }}">Prev</a>
|
||||
{% else %}
|
||||
<a>Prev</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li class="active"><a>{{ page_obj }}</a></li>
|
||||
<li class="{% if not page_obj.has_next %}disabled{% endif %}">
|
||||
{% if page_obj.has_next %}
|
||||
<a href="?page={{ page_obj.next_page_number }}">Next</a>
|
||||
{% else %}
|
||||
<a>Next</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{% load admin2_tags i18n %}
|
||||
<div class="row-fluid">
|
||||
<div class="span12 save_btns">
|
||||
{% if object %}
|
||||
<a class="btn btn-small btn-danger" href="{% url view|admin2_urlname:'delete' pk=object.pk %}">
|
||||
<i class="icon-remove icon-white"></i>
|
||||
{% trans "Delete" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-small" type="submit" name="_addanother">{% trans "Save and add another" %}</button>
|
||||
<button class="btn btn-small" type="submit" name="_continue">{% trans "Save and continue editing" %}</button>
|
||||
<button class="btn btn-small btn-success" type="submit" name="_save">{% trans "Save" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
{% for app_label, registry in apps.items %}
|
||||
{% include 'djadmin2theme_default/includes/app_model_list.html' %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="span4 well pull-right">
|
||||
<h4>{% trans "Recent Actions" %}</h4>
|
||||
<h5>{% trans "My Actions" %}</h5>
|
||||
{% action_history %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "Are you sure?" %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "Delete" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
{# Translators : this is singular, example : delete the post "My Title" #}
|
||||
{% blocktrans with model_name=model_name object=object %}
|
||||
Are you sure you want to delete the {{ model_name }} "{{ object }}"?
|
||||
{% endblocktrans %}
|
||||
|
||||
{% blocktrans count counter=deletable_objects|length %}
|
||||
The following item will be deleted:
|
||||
{% plural %}
|
||||
All of the following items will be deleted:
|
||||
{% endblocktrans %}</p>
|
||||
|
||||
<ul>
|
||||
{{ deletable_objects|unordered_list }}
|
||||
</ul>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button class="btn btn-small btn-danger" type="submit">
|
||||
{% trans "Yes, I'm sure" %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{{ object }}{% endblock title %}
|
||||
|
||||
{% block page_title %}{{ object }}{% endblock page_title%}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{{ object }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ object }}
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% trans "History for" %} {{ object }}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% trans "History for" %} {{ object }}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans "History" %}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
{% blocktrans with object=object %}
|
||||
History for {{ object }}
|
||||
{% endblocktrans %}
|
||||
|
||||
{% if object_list %}
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Date/Time" %}</th>
|
||||
<th>{% trans "User" %}</th>
|
||||
<th>{% trans "Action" %}</th>
|
||||
<th>{% trans "Message" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in object_list %}
|
||||
<tr>
|
||||
<td>{{ log.action_time }}</td>
|
||||
<td>{{ log.user }}</td>
|
||||
<td>{{ log.action_type|capfirst }}</td>
|
||||
<td>{{ log.change_message }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No history for this object.</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock title %}
|
||||
|
||||
{% block page_title %}{% blocktrans with model_name=model_name %}Select {{ model_name }} to change{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block javascript %}{{ block.super }}
|
||||
<script src="/static/themes/bootstrap/js/actions.js"></script>
|
||||
{% endblock javascript %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{{ model_name_pluralized|title }}</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if search_fields %}
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<form method="get" class="form-search">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-medium search-query" placeholder="{% trans 'Search Term' %}" name="q" value="{{search_term}}"/>
|
||||
<button class="btn" type="button"><i class="icon-search"></i> {% trans "Search" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="model-list" class="row">
|
||||
<form id="model-list-form" class="form-inline" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="span12">
|
||||
|
||||
{% if dates %}
|
||||
<ul class="date-drilldown nav well nav-pills">
|
||||
{% if previous_date %}
|
||||
<li class="previous-link">
|
||||
<a href="{{ previous_date.link|safe }}">
|
||||
{{ previous_date.text|safe }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for link, date in dates %}
|
||||
<li class="{% ifequal active_day date %}active{% endifequal %}">
|
||||
<a href="{{ link|safe }}">{{ date }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if view.model_admin.actions_on_top %}
|
||||
{% include 'djadmin2theme_default/includes/list_actions.html' with position='top' %}
|
||||
{% endif %}
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<th class="checkbox-column"><input type="checkbox" class="model-select-all"></th>
|
||||
{% for attr in view.model_admin.list_display %}
|
||||
<th>
|
||||
{# comment if we sorted on this field last time invert the sort #}
|
||||
{% if sort_term == attr %}
|
||||
<a class='sort_link' href='./?sort=-{{attr}}'>
|
||||
{% else %}
|
||||
<a class='sort_link' href='./?sort={{attr}}'>
|
||||
{% endif %}
|
||||
|
||||
{% if forloop.first and attr == "__str__" %}
|
||||
{{ model_name|capfirst }}
|
||||
{% else %}
|
||||
{{ model|model_attr_verbose_name:attr|capfirst }}
|
||||
{% endif %}
|
||||
|
||||
</a>
|
||||
</th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in object_list %}
|
||||
<tr>
|
||||
<td><input type="checkbox" class="model-select" name="selected_model_pk" value="{{ obj.pk }}"></td>
|
||||
{% for attr in view.model_admin.list_display %}
|
||||
<td>
|
||||
{% if permissions.has_change_permission %}
|
||||
<a href="{% url view|admin2_urlname:'update' pk=obj.pk %}">{% render obj attr %}</a>
|
||||
{% else %}
|
||||
{% if permissions.has_view_permission %}
|
||||
<a href="{% url view|admin2_urlname:'detail' pk=obj.pk %}">{% render obj attr %}</a>
|
||||
{% else %}
|
||||
{% render obj attr %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if view.model_admin.actions_on_bottom %}
|
||||
{% include 'djadmin2theme_default/includes/list_actions.html' with position='bottom' %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_paginated %}
|
||||
{% include 'djadmin2theme_default/includes/pagination.html' with position='centered' %}
|
||||
{% endif %}
|
||||
<div>{{ object_list|length }} {{ model_name_pluralized }}</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% block filters %}
|
||||
<div id="list_filter_container" class="well span4">
|
||||
{% if list_filter %}
|
||||
<h4>{# Translators : action verb #}{% trans "Filter" %}</h4>
|
||||
<form id='filter_form' class="form-search">
|
||||
{{ list_filter.form.as_p }}
|
||||
</form>
|
||||
{% else %}
|
||||
<a href='./'>Reset Filter</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock filters %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
|
||||
{% load admin2_tags i18n crispy_forms_tags %}
|
||||
|
||||
{# Translators : examples : Add post, Change object #}
|
||||
{% block title %}{% blocktrans with action=action model_name=model_name %}{{ action_name }} {{ model_name }}{% endblocktrans %}{% endblock title %}
|
||||
|
||||
{# Translators : examples : Add post, Change object #}
|
||||
{% block page_title %}{% blocktrans with action=action model_name=model_name %}{{ action_name }} {{ model_name }}{% endblocktrans %}{% endblock page_title %}
|
||||
|
||||
{% block page_title_link %}
|
||||
{% if object.pk %}
|
||||
<a href="{% url view|admin2_urlname:"history" pk=object.pk %}" class="btn btn-info pull-right">History</a>
|
||||
{% endif %}
|
||||
{% endblock page_title_link %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{% firstof app_verbose_name app_label|title %}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
{% if action == 'Add' %}
|
||||
<li class="active">{{ action_name }}</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"detail" pk=object.pk %}">{{ object }}</a>
|
||||
<span class="divider">/</span>
|
||||
</li>
|
||||
<li class="active">{% trans 'Change' %}</li>
|
||||
{% endif %}
|
||||
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="post" {% if form.is_multipart %}enctype="multipart/form-data" {% endif %}>
|
||||
|
||||
{% if view.model_admin.save_on_top %}
|
||||
{% include "djadmin2theme_default/includes/save_buttons.html" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="row-fluid"><!-- begin main form row -->
|
||||
<div class="span12">
|
||||
|
||||
<div class="change_form">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
{% if not form.visible_fields %}
|
||||
<p class="alert alert-warning empty-form">
|
||||
{% trans "This form doesn't have visible fields. This doesn't mean there are no hidden fields." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% for formset in inlines %}
|
||||
</div>
|
||||
|
||||
<div class="comments_form">
|
||||
<h4>{{ formset.model|model_verbose_name_plural|capfirst }}</h4>
|
||||
{{ formset.management_form }}
|
||||
{% include formset.template %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div><!-- end main form row -->
|
||||
|
||||
{% if view.model_admin.save_on_bottom %}
|
||||
{% include "djadmin2theme_default/includes/save_buttons.html" %}
|
||||
{% endif %}
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{% if value %}
|
||||
<i class="icon-ok-sign" title="True"></i>
|
||||
{% else %}
|
||||
<i class="icon-minus-sign" title="False"></i>
|
||||
{% endif %}
|
||||
|
|
@ -18,15 +18,22 @@ Add djadmin2 and rest_framework to your settings file:
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
...
|
||||
'djadmin2',
|
||||
'djadmin2.themes.djadmin2theme_default', # for the default theme
|
||||
'rest_framework', # for the browsable API templates
|
||||
'floppyforms', # For HTML5 form fields
|
||||
'crispy_forms', # Required for the default theme's layout
|
||||
...
|
||||
)
|
||||
INSTALLED_APPS = (
|
||||
...
|
||||
'djadmin2',
|
||||
'djadmin2.themes.djadmin2theme_bootstrap3', # for the default theme
|
||||
'rest_framework', # for the browsable API templates
|
||||
'floppyforms', # For HTML5 form fields
|
||||
'crispy_forms', # Required for the default theme's layout
|
||||
...
|
||||
)
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
||||
Add djadmin2 urls to your URLconf:
|
||||
|
||||
|
|
@ -53,10 +60,15 @@ See :doc:`contributing`.
|
|||
Migrating from 0.5.x
|
||||
====================
|
||||
|
||||
Themes are now defined explicitly, including the default theme. Therefore, your `settings` need to include this:
|
||||
Themes are a new default theme based on bootstrap3 and also some new settings to add. Therefore, your `settings` need to include this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# In settings.py
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"
|
||||
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_bootstrap3',)
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ See :doc:`built-in-views`
|
|||
Available Themes
|
||||
----------------
|
||||
|
||||
Currently, only the default twitter bootstrap-powered "djadmin2.themes.djadmin2theme_default" theme exists. The goal of this theme is to replicate the original Django admin UI functionality as closely as possible. This helps us ensure that we are not forgetting any functionality that Django users might be dependent on.
|
||||
Currently, only the default twitter bootstrap-powered "djadmin2.themes.djadmin2theme_bootstrap3" theme exists. The goal of this theme is to replicate the original Django admin UI functionality as closely as possible. This helps us ensure that we are not forgetting any functionality that Django users might be dependent on.
|
||||
|
||||
If you'd like to experiment with UI design that differs from the original Django admin UI, please create a new theme. It would be great to have at least 1 experimental theme!
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,38 @@
|
|||
{% load i18n staticfiles %}<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% load i18n %}{% load staticfiles %}<!DOCTYPE html>
|
||||
<html lang="{{ request.LANGUAGE_CODE }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Example.com</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- Bootstrap -->
|
||||
{% block css %}
|
||||
<link href="{% static "themes/bootstrap/css/bootstrap.min.css" %}" rel="stylesheet" media="screen">
|
||||
<link href="{% static "themes/bootstrap/css/bootstrap-custom.css" %}" rel="stylesheet" media="screen">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
|
||||
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"
|
||||
integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r"
|
||||
crossorigin="anonymous">
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"
|
||||
integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1"
|
||||
crossorigin="anonymous">
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{% endblock css %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
|
||||
{% block javascript %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{% static "themes/bootstrap/js/jquery.min.js" %}">\x3C/script>')</script>
|
||||
<script src="{% static "themes/bootstrap/js/bootstrap.min.js" %}"></script>
|
||||
{% endblock javascript %}
|
||||
</body>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
{% block content %}{% endblock content %}
|
||||
</div>
|
||||
{% block javascript %}
|
||||
<script src="https://code.jquery.com/jquery-2.2.4.min.js"
|
||||
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
|
||||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
|
||||
crossorigin="anonymous"></script>
|
||||
{% endblock javascript %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
{% load staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row-fluid">
|
||||
<div class="span10">
|
||||
<h3> <a href='{% url 'blog_list' %}'>Back to the Blog</a> </h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>
|
||||
<a href='{% url 'blog_list' %}'>{% trans "Back to the Blog" %}</a>
|
||||
</h3>
|
||||
<h3>
|
||||
{{ post.title }}
|
||||
</h3>
|
||||
|
|
@ -14,7 +15,6 @@
|
|||
<p>
|
||||
{{ post.body }}
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
{% for comment in post.comments.all %}
|
||||
<li>{{ comment.body }}</li>
|
||||
|
|
@ -22,9 +22,11 @@
|
|||
<li>No comments yet</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
<p> Unpublished - Choose an <a href="{% url 'home' %}">admin</a> tool and publish it.</p>
|
||||
<p>
|
||||
{% url 'home' as home_url %}
|
||||
{% blocktrans %} Unpublished - Choose an <a href="{{ home_url }}">admin</a> tool and publish it.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load i18n staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row-fluid">
|
||||
<div class="span10">
|
||||
<h1>The blog of Example.com</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>{% trans "The blog of Example.com" %}</h1>
|
||||
|
||||
{% for post in post_list %}
|
||||
<h3>
|
||||
|
|
@ -17,15 +17,18 @@
|
|||
{{ post.body }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p> Unpublished - Choose an <a href="{% url 'home' %}">admin</a> tool and publish it.</p>
|
||||
{% url 'home' as home_url %}
|
||||
<p>
|
||||
{% blocktrans %}Unpublished - Choose an <a href="{{ home_url }}">admin</a> tool and publish it.{% endblocktrans %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% empty %}
|
||||
<h3>No Content Yet!</h3>
|
||||
|
||||
<p>Choose an <a href="{% url 'home' %}">admin</a> tool and add content.</p>
|
||||
<h3>{% trans "No Content Yet!" %}</h3>
|
||||
<p>
|
||||
{% url 'home' as home_url %}
|
||||
{% blocktrans %}Choose an <a href="{{ home_url }}">admin</a> tool and add content.{% endblocktrans %}
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
{% load staticfiles i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row-fluid">
|
||||
<div class="span10">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>Example.com</h1>
|
||||
|
||||
<h3>{% trans "Imagine that this is a real site" %}</h3>
|
||||
|
|
@ -24,26 +24,29 @@
|
|||
<p>{% trans "Now, explore the Django admin for example.com. Click on either of the following:" %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span5">
|
||||
<h4>The original <a href="{% url "admin:index" %}">Django Admin</a></h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
{% url "admin:index" as admin_url %}
|
||||
<h4>{% blocktrans %}The original <a href="{{ admin_url }}">Django Admin</a>{% endblocktrans %}</h4>
|
||||
|
||||
<a href="{% url "admin:index" %}">
|
||||
<img class="img-polaroid" src="{% static 'img/admin.png' %}" />
|
||||
<img class="img-responsive" src="{% static 'img/admin.png' %}" />
|
||||
</a>
|
||||
|
||||
<p>Powered by django.contrib.admin. This is just here for reference.</p>
|
||||
<p>{% trans "Powered by django.contrib.admin. This is just here for reference." %}</p>
|
||||
</div>
|
||||
<div class="offset1 span5">
|
||||
<h4>The new <a href="{% url "admin2:dashboard" %}">Admin2</a></h4>
|
||||
<div class="col-sm-6">
|
||||
{% url "admin2:dashboard" as admin2_url %}
|
||||
<h4>{% blocktrans %}The new <a href="{{ admin2_url }}">Admin2</a>{% endblocktrans %}</h4>
|
||||
|
||||
<a href="{% url "admin2:dashboard" %}">
|
||||
<img class="img-polaroid" src="{% static 'img/admin2.png' %}" />
|
||||
<img class="img-responsive" src="{% static 'img/admin2.png' %}" />
|
||||
</a>
|
||||
|
||||
<p>Powered by django-admin2.</p>
|
||||
<p>{% trans "Powered by django-admin2." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<h2>See the <a href="{% url 'blog_list' %}">Blog</a> in Action</h2>
|
||||
{% url 'blog_list' as blog_url %}
|
||||
<h2>{% blocktrans %}See the <a href="{{ blog_url }}">Blog</a> in Action{% endblocktrans %}</h2>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load admin2_tags i18n %}
|
||||
|
||||
{% block title %}{% trans "Are you sure?" %}{% endblock title %}
|
||||
|
|
@ -6,15 +6,22 @@
|
|||
{% block page_title %}{% trans "Are you sure?" %}{% endblock page_title %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a> <span class="divider">/</span></li>
|
||||
<li class="active">{% trans "Publish" %}</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:dashboard" %}">{% trans "Home" %}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url "admin2:app_index" app_label=app_label %}">{{ app_label|title }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url view|admin2_urlname:"index" %}">{{ model_name_pluralized|title }}</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
{% trans "Publish" %}
|
||||
</li>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
{% blocktrans with objects_name=objects_name count counter=deletable_objects|length %}Are you sure you want to publish the selected {{ objects_name }}?
|
||||
The following item will be published:
|
||||
|
|
@ -34,7 +41,6 @@
|
|||
{% for item in queryset %}
|
||||
<input type="hidden" name="selected_model_pk" value="{{ item.pk }}" />
|
||||
{% endfor %}
|
||||
<button class="btn btn-small btn-danger" type="submit">{% trans "Publish" %}</button>
|
||||
<button class="btn btn-sm btn-danger" type="submit">{% trans "Publish" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock content %}
|
||||
|
|
|
|||
|
|
@ -198,12 +198,12 @@ class PostListTest(BaseIntegrationTest):
|
|||
def test_renderer_unpublished(self):
|
||||
Post.objects.create(title='title', body='body', published=False)
|
||||
response = self.client.get(reverse('admin2:blog_post_index'))
|
||||
self.assertContains(response, 'icon-minus-sign')
|
||||
self.assertContains(response, 'fa fa-minus')
|
||||
|
||||
def test_renderer_published(self):
|
||||
Post.objects.create(title='title', body='body', published=True)
|
||||
response = self.client.get(reverse('admin2:blog_post_index'))
|
||||
self.assertContains(response, 'icon-ok-sign')
|
||||
self.assertContains(response, 'fa fa-check')
|
||||
|
||||
def test_drilldowns(self):
|
||||
self._create_posts()
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ INSTALLED_APPS = [
|
|||
'crispy_forms',
|
||||
'djadmin2',
|
||||
'djadmin2.tests',
|
||||
'djadmin2.themes.djadmin2theme_default',
|
||||
'djadmin2.themes.djadmin2theme_bootstrap3',
|
||||
'blog',
|
||||
'files',
|
||||
'polls'
|
||||
|
|
@ -145,9 +145,9 @@ STATICFILES_DIRS = (
|
|||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
MEDIA_URL = "/media/"
|
||||
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default"
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap3"
|
||||
ADMIN2_THEME_DIRECTORY = "djadmin2theme_bootstrap3"
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<h1>{% trans "Example Home" %}</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url "admin2:dashboard" %}">django-admin2</a></li>
|
||||
<li><a href="{% url "admin:index" %}">django.contrib.admin</a> {% trans "(for reference)" %}</li>
|
||||
</ul>
|
||||
{% block content %}
|
||||
<h1>{% trans "Example Home" %}</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url "admin2:dashboard" %}">django-admin2</a></li>
|
||||
<li><a href="{% url "admin:index" %}">django.contrib.admin</a> {% trans "(for reference)" %}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
{% extends "djadmin2theme_default/base.html" %}
|
||||
{% extends "djadmin2theme_bootstrap3/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<h1>{% trans "Example Home" %}</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url "admin2:dashboard" %}">django-admin2</a></li>
|
||||
<li><a href="{% url "admin:index" %}">django.contrib.admin</a> {% trans "(for reference)" %}</li>
|
||||
</ul>
|
||||
{% block content %}
|
||||
<h1>{% trans "Example Home" %}</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="{% url "admin2:dashboard" %}">django-admin2</a></li>
|
||||
<li><a href="{% url "admin:index" %}">django.contrib.admin</a> {% trans "(for reference)" %}</li>
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue