diff --git a/fabfile.py b/fabfile.py index 44f30fe..e3055b5 100644 --- a/fabfile.py +++ b/fabfile.py @@ -241,6 +241,7 @@ def makemessages(): run('django-admin.py makemessages -l es', quiet=True) """ +@task_environment @task def clean_backups(BCK_BASE_PATH='/backups/sql', DAYS='30'): """ @@ -250,6 +251,7 @@ def clean_backups(BCK_BASE_PATH='/backups/sql', DAYS='30'): with settings(hide('warnings', 'running', 'stdout', 'stderr')): local('find %s -mtime +%s -exec rm -rf {} \;' % (BCK_BASE_PATH, DAYS)) +@task_environment @task def backup(): """ diff --git a/shelfzilla/apps/users/context_processors.py b/shelfzilla/apps/users/context_processors.py new file mode 100644 index 0000000..7f37edc --- /dev/null +++ b/shelfzilla/apps/users/context_processors.py @@ -0,0 +1,12 @@ +def user_is_staff(request): + return { + 'USER_IS_STAFF': request.user.is_staff + } + + +def user_configuration(request): + return { + 'USER_CONFIG': { + 'show_admin_links': False + } + } diff --git a/shelfzilla/locale/es/LC_MESSAGES/django.mo b/shelfzilla/locale/es/LC_MESSAGES/django.mo index 83205de..28cbdad 100644 Binary files a/shelfzilla/locale/es/LC_MESSAGES/django.mo and b/shelfzilla/locale/es/LC_MESSAGES/django.mo differ diff --git a/shelfzilla/locale/es/LC_MESSAGES/django.po b/shelfzilla/locale/es/LC_MESSAGES/django.po index 93e5f68..7e6c619 100644 --- a/shelfzilla/locale/es/LC_MESSAGES/django.po +++ b/shelfzilla/locale/es/LC_MESSAGES/django.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-08-24 17:04+0200\n" -"PO-Revision-Date: 2014-08-24 17:04+0200\n" +"POT-Creation-Date: 2014-08-24 17:18+0200\n" +"PO-Revision-Date: 2014-08-24 17:18+0200\n" "Last-Translator: Felipe Martin \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" @@ -115,7 +115,7 @@ msgstr "Editorial" #: apps/manga/models.py:54 themes/bootflat/templates/_layout.html:36 #: themes/bootflat/templates/manga/publishers/list.html:4 -#: themes/bootflat/templates/manga/series/detail.html:64 +#: themes/bootflat/templates/manga/series/detail.html:70 msgid "Publishers" msgstr "Editoriales" @@ -124,7 +124,7 @@ msgid "Summary" msgstr "Resumen" #: apps/manga/models.py:62 -#: themes/bootflat/templates/manga/series/detail.html:25 +#: themes/bootflat/templates/manga/series/detail.html:31 msgid "Finished" msgstr "Finalizado" @@ -326,7 +326,7 @@ msgstr "Sin resultados" #: themes/bootflat/templates/manga/publishers/detail.html:14 #: themes/bootflat/templates/manga/publishers/detail.html:43 -#: themes/bootflat/templates/manga/series/detail.html:19 +#: themes/bootflat/templates/manga/series/detail.html:25 #: themes/bootflat/templates/manga/series/includes/volume.html:25 msgid "Requires review" msgstr "Requiere revisión" @@ -335,23 +335,28 @@ msgstr "Requiere revisión" msgid "Homepage" msgstr "Página principal" -#: themes/bootflat/templates/manga/series/detail.html:23 +#: themes/bootflat/templates/manga/series/detail.html:10 +#: themes/bootflat/templates/manga/series/includes/volume.html:42 +msgid "Edit in admin" +msgstr "Editar en el admin" + +#: themes/bootflat/templates/manga/series/detail.html:29 msgid "Status" msgstr "Estado" -#: themes/bootflat/templates/manga/series/detail.html:27 +#: themes/bootflat/templates/manga/series/detail.html:33 msgid "Open" msgstr "Abierta" -#: themes/bootflat/templates/manga/series/detail.html:35 +#: themes/bootflat/templates/manga/series/detail.html:41 msgid "Art" msgstr "Arte" -#: themes/bootflat/templates/manga/series/detail.html:50 +#: themes/bootflat/templates/manga/series/detail.html:56 msgid "Story" msgstr "Historia" -#: themes/bootflat/templates/manga/series/detail.html:69 +#: themes/bootflat/templates/manga/series/detail.html:75 msgid "Original publisher" msgstr "Editorial original" diff --git a/shelfzilla/settings/base.py b/shelfzilla/settings/base.py index 7ab6d5e..4c0a07d 100644 --- a/shelfzilla/settings/base.py +++ b/shelfzilla/settings/base.py @@ -79,6 +79,8 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'shelfzilla.apps.pjax.context_processors.pjax', 'shelfzilla.apps.manga.context_processors.user_have_volumes', 'shelfzilla.apps.manga.context_processors.user_wishlisted_volumes', + 'shelfzilla.apps.users.context_processors.user_is_staff', + 'shelfzilla.apps.users.context_processors.user_configuration', ) MIDDLEWARE_CLASSES = ( diff --git a/shelfzilla/themes/bootflat/static/less/fixes.less b/shelfzilla/themes/bootflat/static/less/fixes.less index 47f1b06..053490b 100644 --- a/shelfzilla/themes/bootflat/static/less/fixes.less +++ b/shelfzilla/themes/bootflat/static/less/fixes.less @@ -53,6 +53,11 @@ width: @size; } } + + .admin { + position: absolute; + bottom: 10px; + } } .navbar-nav { diff --git a/shelfzilla/themes/bootflat/templates/manga/publishers/detail.html b/shelfzilla/themes/bootflat/templates/manga/publishers/detail.html index a5e5174..2e88241 100644 --- a/shelfzilla/themes/bootflat/templates/manga/publishers/detail.html +++ b/shelfzilla/themes/bootflat/templates/manga/publishers/detail.html @@ -5,6 +5,12 @@ {% block main_content %}
+ {% if USER_IS_STAFF and USER_CONFIG.show_admin_links %} + +
+ {% endif %}
diff --git a/shelfzilla/themes/bootflat/templates/manga/series/detail.html b/shelfzilla/themes/bootflat/templates/manga/series/detail.html index 483978d..7ba9606 100644 --- a/shelfzilla/themes/bootflat/templates/manga/series/detail.html +++ b/shelfzilla/themes/bootflat/templates/manga/series/detail.html @@ -5,6 +5,12 @@ {% block main_content %}
+ {% if USER_IS_STAFF and USER_CONFIG.show_admin_links %} + +
+ {% endif %}
diff --git a/shelfzilla/themes/bootflat/templates/manga/series/includes/volume.html b/shelfzilla/themes/bootflat/templates/manga/series/includes/volume.html index 16d93e5..b531fea 100644 --- a/shelfzilla/themes/bootflat/templates/manga/series/includes/volume.html +++ b/shelfzilla/themes/bootflat/templates/manga/series/includes/volume.html @@ -35,4 +35,11 @@ {% endif %}
+ {% if USER_IS_STAFF and USER_CONFIG.show_admin_links %} + + {% endif %}
diff --git a/shelfzilla/themes/bootflat/templates/users/profile.html b/shelfzilla/themes/bootflat/templates/users/profile.html index cc2cff4..6891fe8 100644 --- a/shelfzilla/themes/bootflat/templates/users/profile.html +++ b/shelfzilla/themes/bootflat/templates/users/profile.html @@ -40,7 +40,7 @@
- +
diff --git a/shelfzilla/themes/bootflat/templates/users/profile/summary.html b/shelfzilla/themes/bootflat/templates/users/profile/summary.html index 55a5d5e..612121e 100644 --- a/shelfzilla/themes/bootflat/templates/users/profile/summary.html +++ b/shelfzilla/themes/bootflat/templates/users/profile/summary.html @@ -7,18 +7,19 @@ {% block profile_content %}
-
+

{{ user.have_volumes.count }}

{% trans "Volumes owned" %}
-
+

{{ user.wishlisted_volumes.count }}

{% trans "Volumes wishlisted" %}
+ {% comment %}

--

@@ -31,6 +32,7 @@ Other
+ {% endcomment %}

Interesting. No, wait, the other thing: tedious. What are you hacking off? Is it my torso?! 'It is!' My precious torso! Yes, if you make it look like an electrical fire. When you do things right, people won't be sure you've done anything at all. Take me to your leader! Ven ve voke up, ve had zese wodies.