Compare commits

..

7 Commits

Author SHA1 Message Date
Fabio Caccamo 8291a65a15 Updated version [ci skip] 2019-03-20 17:58:20 +01:00
Fabio Caccamo 9433287cee Updated messages. 2019-03-20 17:53:25 +01:00
Fabio Caccamo f0a046ff7f Added related modal close button #45 2019-03-20 17:53:03 +01:00
Fabio Caccamo 877c4da5bf Updated fields verbose names. 2019-03-20 12:42:10 +01:00
Fabio Caccamo 229a4ef573 Updated README. [ci skip] 2019-03-20 12:34:29 +01:00
Fabio Caccamo cf5e784550 Updated messages. 2019-03-20 12:34:17 +01:00
Fabio Caccamo e58bbbeacf Added environment options - Fixed #56 2019-03-20 12:33:53 +01:00
19 changed files with 401 additions and 279 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
- Responsive - Responsive
- List filter dropdown *(optional)* - List filter dropdown *(optional)*
- `NEW` **Related modal** *(instead of the old popup window, optional)* - `NEW` **Related modal** *(instead of the old popup window, optional)*
- `NEW` **Enviroment label** *(development, testing, staging, production)* - `NEW` **Environment name/marker**
- Style optimizations for: - Style optimizations for:
- `django-ckeditor` - `django-ckeditor`
- `django-modeltranslation` - `django-modeltranslation`
+1 -1
View File
@@ -17,7 +17,7 @@ Features
- Responsive - Responsive
- List filter dropdown *(optional)* - List filter dropdown *(optional)*
- ``NEW`` **Related modal** (instead of the old popup window, optional) - ``NEW`` **Related modal** (instead of the old popup window, optional)
- ``NEW`` **Enviroment label** (development, testing, staging, production) - ``NEW`` **Environment name/marker**
- Style optimizations for: - Style optimizations for:
- `django-ckeditor` - `django-ckeditor`
- `django-modeltranslation` - `django-modeltranslation`
+5 -2
View File
@@ -19,8 +19,10 @@ class ThemeAdmin(admin.ModelAdmin):
(_('Environment'), { (_('Environment'), {
'classes': ('wide', ), 'classes': ('wide', ),
'fields': ( 'fields': (
'env', 'env_name',
'env_visible', 'env_color',
'env_visible_in_header',
'env_visible_in_favicon',
) )
}), }),
(_('Logo'), { (_('Logo'), {
@@ -92,6 +94,7 @@ class ThemeAdmin(admin.ModelAdmin):
'related_modal_background_color', 'related_modal_background_color',
'related_modal_background_opacity', 'related_modal_background_opacity',
'related_modal_rounded_corners', 'related_modal_rounded_corners',
'related_modal_close_button_visible',
) )
}), }),
(_('List Filter'), { (_('List Filter'), {
Binary file not shown.
+66 -61
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: django-admin-interface\n" "Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-07 11:23-0500\n" "POT-Creation-Date: 2019-03-20 16:12+0000\n"
"PO-Revision-Date: 2018-12-30 19:13-0500\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n"
"Last-Translator: Martin Vuelta <martin.vuelta@softbutterfly.io>\n" "Last-Translator: Martin Vuelta <martin.vuelta@softbutterfly.io>\n"
"Language-Team: Spanish <dev@softbutterfly.io>\n" "Language-Team: Spanish <dev@softbutterfly.io>\n"
@@ -19,169 +19,174 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: admin.py:19 #: admin_interface/admin.py:19
msgid "Environment" msgid "Environment"
msgstr "Ambiente" msgstr "Ambiente"
#: admin.py:26 #: admin_interface/admin.py:28
msgid "Logo" msgid "Logo"
msgstr "Logo" msgstr "Logo"
#: admin.py:34 #: admin_interface/admin.py:36
msgid "Favicon" msgid "Favicon"
msgstr "Favicon" msgstr "Favicon"
#: admin.py:38 #: admin_interface/admin.py:40
msgid "Title" msgid "Title"
msgstr "Título" msgstr "Título"
#: admin.py:46 #: admin_interface/admin.py:48
msgid "Header" msgid "Header"
msgstr "Encabezado" msgstr "Encabezado"
#: admin.py:55 #: admin_interface/admin.py:57
msgid "Breadcrumbs / Module headers" msgid "Breadcrumbs / Module headers"
msgstr "Breadcrumbs / Encabezados de módulos" msgstr "Breadcrumbs / Encabezados de módulos"
#: admin.py:65 #: admin_interface/admin.py:67
msgid "Generic Links" msgid "Generic Links"
msgstr "Enlaces genéricos" msgstr "Enlaces genéricos"
#: admin.py:72 #: admin_interface/admin.py:74
msgid "Save Buttons" msgid "Save Buttons"
msgstr "Botones de guardar" msgstr "Botones de guardar"
#: admin.py:80 #: admin_interface/admin.py:82
msgid "Delete Buttons" msgid "Delete Buttons"
msgstr "Botones de borrar" msgstr "Botones de borrar"
#: admin.py:88 #: admin_interface/admin.py:90
msgid "Related Modal" msgid "Related Modal"
msgstr "Modal para objetos relacionados" msgstr "Modal para objetos relacionados"
#: admin.py:97 #: admin_interface/admin.py:99
msgid "List Filter" msgid "List Filter"
msgstr "Lista de filtros" msgstr "Lista de filtros"
#: admin.py:101 #: admin_interface/admin.py:103
msgid "Recent Actions" msgid "Recent Actions"
msgstr "Acciones recientes" msgstr "Acciones recientes"
#: apps.py:11 #: admin_interface/apps.py:11
msgid "Admin Interface" msgid "Admin Interface"
msgstr "Interfaz de administración" msgstr "Interfaz de administración"
#: models.py:54 #: admin_interface/models.py:56 admin_interface/models.py:100
msgid "name" msgid "name"
msgstr "Nombre" msgstr "Nombre"
#: models.py:57 models.py:220 #: admin_interface/models.py:59 admin_interface/models.py:224
msgid "active" msgid "active"
msgstr "Activo" msgstr "Activo"
#: models.py:61 templates/admin/base_site.html:6 #: admin_interface/models.py:63
#: templates/admin/base_site.html:66 #: admin_interface/templates/admin/base_site.html:6
#: admin_interface/templates/admin/base_site.html:60
msgid "Django administration" msgid "Django administration"
msgstr "Administración de Django" msgstr "Administración de Django"
#: models.py:63 #: admin_interface/models.py:65
msgid "title" msgid "title"
msgstr "Título" msgstr "Título"
#: models.py:69 #: admin_interface/models.py:71 admin_interface/models.py:86
msgid "title color" #: admin_interface/models.py:106
msgstr "Color de título" #, fuzzy
#| msgid "logo color"
msgid "color"
msgstr "color de logo"
#: models.py:72 models.py:87 models.py:108 models.py:253 #: admin_interface/models.py:74 admin_interface/models.py:89
#: admin_interface/models.py:260
msgid "visible" msgid "visible"
msgstr "Visible" msgstr "Visible"
#: models.py:77 #: admin_interface/models.py:79
msgid "Leave blank to use the default Django logo" msgid "Leave blank to use the default Django logo"
msgstr "Dejar en blanco para usaer el logo por defecto de Django" msgstr "Dejar en blanco para usaer el logo por defecto de Django"
#: models.py:78 #: admin_interface/models.py:80
msgid "logo" msgid "logo"
msgstr "logo" msgstr "logo"
#: models.py:84 #: admin_interface/models.py:94
msgid "logo color"
msgstr "color de logo"
#: models.py:92
msgid "(.ico|.png|.gif - 16x16|32x32 px)" msgid "(.ico|.png|.gif - 16x16|32x32 px)"
msgstr "Formatos ico, png o gif. Tamaños de 16x16 o 32x32 pixeles" msgstr "Formatos ico, png o gif. Tamaños de 16x16 o 32x32 pixeles"
#: models.py:93 #: admin_interface/models.py:95
msgid "favicon" msgid "favicon"
msgstr "favicon" msgstr "favicon"
#: models.py:96 #: admin_interface/models.py:104
msgid "Development" msgid ""
msgstr "Desarrollo" "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: "
"#3498DB)"
msgstr ""
#: models.py:97 #: admin_interface/models.py:109
msgid "Testing" msgid "visible in header (marker and name)"
msgstr "Pruebas" msgstr ""
#: models.py:98 #: admin_interface/models.py:112
msgid "Staging" msgid "visible in favicon (marker)"
msgstr "Depliegue" msgstr ""
#: models.py:99 #: admin_interface/models.py:119 admin_interface/models.py:144
msgid "Production" #: admin_interface/models.py:185 admin_interface/models.py:204
msgstr "Producción" #: admin_interface/models.py:230
#: models.py:105
msgid "environment"
msgstr "ambiente"
#: models.py:115 models.py:140 models.py:181 models.py:200 models.py:226
msgid "background color" msgid "background color"
msgstr "color de fondo" msgstr "color de fondo"
#: models.py:121 models.py:146 models.py:193 models.py:212 models.py:216 #: admin_interface/models.py:125 admin_interface/models.py:150
#: admin_interface/models.py:197 admin_interface/models.py:216
#: admin_interface/models.py:220
msgid "text color" msgid "text color"
msgstr "color de texto" msgstr "color de texto"
#: models.py:127 models.py:152 models.py:168 #: admin_interface/models.py:131 admin_interface/models.py:156
#: admin_interface/models.py:172
msgid "link color" msgid "link color"
msgstr "color de enlace" msgstr "color de enlace"
#: models.py:133 models.py:158 models.py:174 #: admin_interface/models.py:137 admin_interface/models.py:162
#: admin_interface/models.py:178
msgid "link hover color" msgid "link hover color"
msgstr "color de enlace (hover)" msgstr "color de enlace (hover)"
#: models.py:161 models.py:246 #: admin_interface/models.py:165 admin_interface/models.py:250
msgid "rounded corners" msgid "rounded corners"
msgstr "esquinas redondas" msgstr "esquinas redondas"
#: models.py:187 models.py:206 #: admin_interface/models.py:191 admin_interface/models.py:210
msgid "background hover color" msgid "background hover color"
msgstr "color de fondo (hover)" msgstr "color de fondo (hover)"
#: models.py:243 #: admin_interface/models.py:247
msgid "background opacity" msgid "background opacity"
msgstr "opacidad de fondo" msgstr "opacidad de fondo"
#: models.py:250 #: admin_interface/models.py:253
msgid "close button visible"
msgstr ""
#: admin_interface/models.py:257
msgid "use dropdown" msgid "use dropdown"
msgstr "Usar lista desplegable" msgstr "Usar lista desplegable"
#: models.py:262 #: admin_interface/models.py:269
msgid "Theme" msgid "Theme"
msgstr "Tema" msgstr "Tema"
#: models.py:263 #: admin_interface/models.py:270
msgid "Themes" msgid "Themes"
msgstr "Temas" msgstr "Temas"
#: templates/admin/filter.html:13 #: admin_interface/templates/admin/filter.html:13
#: templates/admin_interface/dropdown_filter.html:4 #: admin_interface/templates/admin_interface/dropdown_filter.html:4
#, python-format #, python-format
msgid " By %(filter_title)s " msgid " By %(filter_title)s "
msgstr " Por %(filter_title)s " msgstr " Por %(filter_title)s "
#: templates/admin/popup_response.html:3 #: admin_interface/templates/admin/popup_response.html:3
msgid "Popup closing..." msgid "Popup closing..."
msgstr "Cerando popup..." msgstr "Cerando popup..."
Binary file not shown.
+66 -61
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-07 11:23-0500\n" "POT-Creation-Date: 2019-03-20 16:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,169 +18,174 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: admin.py:19 #: admin_interface/admin.py:19
msgid "Environment" msgid "Environment"
msgstr "Environnment" msgstr "Environnment"
#: admin.py:26 #: admin_interface/admin.py:28
msgid "Logo" msgid "Logo"
msgstr "Logo" msgstr "Logo"
#: admin.py:34 #: admin_interface/admin.py:36
msgid "Favicon" msgid "Favicon"
msgstr "Favicon" msgstr "Favicon"
#: admin.py:38 #: admin_interface/admin.py:40
msgid "Title" msgid "Title"
msgstr "Titre" msgstr "Titre"
#: admin.py:46 #: admin_interface/admin.py:48
msgid "Header" msgid "Header"
msgstr "Bannière" msgstr "Bannière"
#: admin.py:55 #: admin_interface/admin.py:57
msgid "Breadcrumbs / Module headers" msgid "Breadcrumbs / Module headers"
msgstr "Fil d'ariane / en-têtes de module" msgstr "Fil d'ariane / en-têtes de module"
#: admin.py:65 #: admin_interface/admin.py:67
msgid "Generic Links" msgid "Generic Links"
msgstr "Liens génériques" msgstr "Liens génériques"
#: admin.py:72 #: admin_interface/admin.py:74
msgid "Save Buttons" msgid "Save Buttons"
msgstr "Boutons sauvegarder" msgstr "Boutons sauvegarder"
#: admin.py:80 #: admin_interface/admin.py:82
msgid "Delete Buttons" msgid "Delete Buttons"
msgstr "Boutons supprimer" msgstr "Boutons supprimer"
#: admin.py:88 #: admin_interface/admin.py:90
msgid "Related Modal" msgid "Related Modal"
msgstr "Modale pour objet reliés" msgstr "Modale pour objet reliés"
#: admin.py:97 #: admin_interface/admin.py:99
msgid "List Filter" msgid "List Filter"
msgstr "Filtre de liste" msgstr "Filtre de liste"
#: admin.py:101 #: admin_interface/admin.py:103
msgid "Recent Actions" msgid "Recent Actions"
msgstr "Actions récentes" msgstr "Actions récentes"
#: apps.py:11 #: admin_interface/apps.py:11
msgid "Admin Interface" msgid "Admin Interface"
msgstr "Interface Admin" msgstr "Interface Admin"
#: models.py:54 #: admin_interface/models.py:56 admin_interface/models.py:100
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
#: models.py:57 models.py:220 #: admin_interface/models.py:59 admin_interface/models.py:224
msgid "active" msgid "active"
msgstr "actif" msgstr "actif"
#: models.py:61 templates/admin/base_site.html:6 #: admin_interface/models.py:63
#: templates/admin/base_site.html:66 #: admin_interface/templates/admin/base_site.html:6
#: admin_interface/templates/admin/base_site.html:60
msgid "Django administration" msgid "Django administration"
msgstr "Administration Django" msgstr "Administration Django"
#: models.py:63 #: admin_interface/models.py:65
msgid "title" msgid "title"
msgstr "titre" msgstr "titre"
#: models.py:69 #: admin_interface/models.py:71 admin_interface/models.py:86
msgid "title color" #: admin_interface/models.py:106
msgstr "couleur du titre" #, fuzzy
#| msgid "logo color"
msgid "color"
msgstr "couleur du logo"
#: models.py:72 models.py:87 models.py:108 models.py:253 #: admin_interface/models.py:74 admin_interface/models.py:89
#: admin_interface/models.py:260
msgid "visible" msgid "visible"
msgstr "visible" msgstr "visible"
#: models.py:77 #: admin_interface/models.py:79
msgid "Leave blank to use the default Django logo" msgid "Leave blank to use the default Django logo"
msgstr "Laisser vide pour utiliser le logo Django par défaut" msgstr "Laisser vide pour utiliser le logo Django par défaut"
#: models.py:78 #: admin_interface/models.py:80
msgid "logo" msgid "logo"
msgstr "logo" msgstr "logo"
#: models.py:84 #: admin_interface/models.py:94
msgid "logo color"
msgstr "couleur du logo"
#: models.py:92
msgid "(.ico|.png|.gif - 16x16|32x32 px)" msgid "(.ico|.png|.gif - 16x16|32x32 px)"
msgstr "(.ico|.png|.gif - 16x16|32x32 px)" msgstr "(.ico|.png|.gif - 16x16|32x32 px)"
#: models.py:93 #: admin_interface/models.py:95
msgid "favicon" msgid "favicon"
msgstr "favicon" msgstr "favicon"
#: models.py:96 #: admin_interface/models.py:104
msgid "Development" msgid ""
msgstr "Développement" "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: "
"#3498DB)"
msgstr ""
#: models.py:97 #: admin_interface/models.py:109
msgid "Testing" msgid "visible in header (marker and name)"
msgstr "Test" msgstr ""
#: models.py:98 #: admin_interface/models.py:112
msgid "Staging" msgid "visible in favicon (marker)"
msgstr "Pré-prod" msgstr ""
#: models.py:99 #: admin_interface/models.py:119 admin_interface/models.py:144
msgid "Production" #: admin_interface/models.py:185 admin_interface/models.py:204
msgstr "Production" #: admin_interface/models.py:230
#: models.py:105
msgid "environment"
msgstr "environment"
#: models.py:115 models.py:140 models.py:181 models.py:200 models.py:226
msgid "background color" msgid "background color"
msgstr "couleur d'arrière-plan" msgstr "couleur d'arrière-plan"
#: models.py:121 models.py:146 models.py:193 models.py:212 models.py:216 #: admin_interface/models.py:125 admin_interface/models.py:150
#: admin_interface/models.py:197 admin_interface/models.py:216
#: admin_interface/models.py:220
msgid "text color" msgid "text color"
msgstr "couleur du texte" msgstr "couleur du texte"
#: models.py:127 models.py:152 models.py:168 #: admin_interface/models.py:131 admin_interface/models.py:156
#: admin_interface/models.py:172
msgid "link color" msgid "link color"
msgstr "couleur de lien" msgstr "couleur de lien"
#: models.py:133 models.py:158 models.py:174 #: admin_interface/models.py:137 admin_interface/models.py:162
#: admin_interface/models.py:178
msgid "link hover color" msgid "link hover color"
msgstr "couleur de lien au survol" msgstr "couleur de lien au survol"
#: models.py:161 models.py:246 #: admin_interface/models.py:165 admin_interface/models.py:250
msgid "rounded corners" msgid "rounded corners"
msgstr "coins arrondis" msgstr "coins arrondis"
#: models.py:187 models.py:206 #: admin_interface/models.py:191 admin_interface/models.py:210
msgid "background hover color" msgid "background hover color"
msgstr "couleur de fond au survol" msgstr "couleur de fond au survol"
#: models.py:243 #: admin_interface/models.py:247
msgid "background opacity" msgid "background opacity"
msgstr "opacité de l'arrière-plan" msgstr "opacité de l'arrière-plan"
#: models.py:250 #: admin_interface/models.py:253
msgid "close button visible"
msgstr ""
#: admin_interface/models.py:257
msgid "use dropdown" msgid "use dropdown"
msgstr "utiliser un menu déroulant" msgstr "utiliser un menu déroulant"
#: models.py:262 #: admin_interface/models.py:269
msgid "Theme" msgid "Theme"
msgstr "Thème" msgstr "Thème"
#: models.py:263 #: admin_interface/models.py:270
msgid "Themes" msgid "Themes"
msgstr "Thèmes" msgstr "Thèmes"
#: templates/admin/filter.html:13 #: admin_interface/templates/admin/filter.html:13
#: templates/admin_interface/dropdown_filter.html:4 #: admin_interface/templates/admin_interface/dropdown_filter.html:4
#, python-format #, python-format
msgid " By %(filter_title)s " msgid " By %(filter_title)s "
msgstr " Par %(filter_title)s " msgstr " Par %(filter_title)s "
#: templates/admin/popup_response.html:3 #: admin_interface/templates/admin/popup_response.html:3
msgid "Popup closing..." msgid "Popup closing..."
msgstr "Fermeture de la modale..." msgstr "Fermeture de la modale..."
Binary file not shown.
+80 -75
View File
@@ -2,186 +2,191 @@
# django-admin-interface package. # django-admin-interface package.
# #
# Translators: # Translators:
# Fabio Caccamo, 2019 # Fabio Caccamo <fabio.caccamo@gmail.com>, 2018
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: django-admin-interface\n" "Project-Id-Version: django-admin-interface\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-01-07 11:23-0500\n" "POT-Creation-Date: 2019-03-20 16:12+0000\n"
"PO-Revision-Date: 2019-01-04 11:00-0000\n" "PO-Revision-Date: 2018-12-30 19:13-0500\n"
"Last-Translator: Fabio Caccamo\n" "Last-Translator: Fabio Caccamo <fabio.caccamo@gmail.com>\n"
"Language-Team: Italian\n" "Language-Team: Italian <LL@li.org>\n"
"Language: Italian \n" "Language: Italian \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: admin.py:19 #: admin_interface/admin.py:19
msgid "Environment" msgid "Environment"
msgstr "Ambiente" msgstr "Ambiente"
#: admin.py:26 #: admin_interface/admin.py:28
msgid "Logo" msgid "Logo"
msgstr "Logo" msgstr "Logo"
#: admin.py:34 #: admin_interface/admin.py:36
msgid "Favicon" msgid "Favicon"
msgstr "Favicon" msgstr "Favicon"
#: admin.py:38 #: admin_interface/admin.py:40
msgid "Title" msgid "Title"
msgstr "Titolo" msgstr "Titolo"
#: admin.py:46 #: admin_interface/admin.py:48
msgid "Header" msgid "Header"
msgstr "Header" msgstr "Header"
#: admin.py:55 #: admin_interface/admin.py:57
msgid "Breadcrumbs / Module headers" msgid "Breadcrumbs / Module headers"
msgstr "Breadcrumbs / Header dei moduli" msgstr "Breadcrumbs / Header dei moduli"
#: admin.py:65 #: admin_interface/admin.py:67
msgid "Generic Links" msgid "Generic Links"
msgstr "Link generici" msgstr "Link generici"
#: admin.py:72 #: admin_interface/admin.py:74
msgid "Save Buttons" msgid "Save Buttons"
msgstr "Pulsanti per salvare" msgstr "Pulsanti per salvare"
#: admin.py:80 #: admin_interface/admin.py:82
msgid "Delete Buttons" msgid "Delete Buttons"
msgstr "Pulsanti per eliminare" msgstr "Pulsanti per eliminare"
#: admin.py:88 #: admin_interface/admin.py:90
msgid "Related Modal" msgid "Related Modal"
msgstr "Modale per gli oggetti correlati" msgstr "Modale per gli oggetti correlati"
#: admin.py:97 #: admin_interface/admin.py:99
msgid "List Filter" msgid "List Filter"
msgstr "Filtro listato" msgstr "Filtro listato"
#: admin.py:101 #: admin_interface/admin.py:103
msgid "Recent Actions" msgid "Recent Actions"
msgstr "Azioni recenti" msgstr "Azioni recenti"
#: apps.py:11 #: admin_interface/apps.py:11
msgid "Admin Interface" msgid "Admin Interface"
msgstr "Interfaccia di admin" msgstr "Interfaccia di admin"
#: models.py:54 #: admin_interface/models.py:56 admin_interface/models.py:100
msgid "name" msgid "name"
msgstr "Nome" msgstr "nome"
#: models.py:57 models.py:220 #: admin_interface/models.py:59 admin_interface/models.py:224
msgid "active" msgid "active"
msgstr "Attivo" msgstr "attivo"
#: models.py:61 templates/admin/base_site.html:6 #: admin_interface/models.py:63
#: templates/admin/base_site.html:66 #: admin_interface/templates/admin/base_site.html:6
#: admin_interface/templates/admin/base_site.html:60
msgid "Django administration" msgid "Django administration"
msgstr "Amministrazione di Django" msgstr "Amministrazione di Django"
#: models.py:63 #: admin_interface/models.py:65
msgid "title" msgid "title"
msgstr "Titolo" msgstr "titolo"
#: models.py:69 #: admin_interface/models.py:71 admin_interface/models.py:86
msgid "title color" #: admin_interface/models.py:106
msgstr "Colore del titolo" msgid "color"
msgstr "colore"
#: models.py:72 models.py:87 models.py:108 models.py:253 #: admin_interface/models.py:74 admin_interface/models.py:89
#: admin_interface/models.py:260
msgid "visible" msgid "visible"
msgstr "Visibile" msgstr "visibile"
#: models.py:77 #: admin_interface/models.py:79
msgid "Leave blank to use the default Django logo" msgid "Leave blank to use the default Django logo"
msgstr "Lasciare vuoto per usare il logo Django di default" msgstr "Lasciare vuoto per usare il logo Django di default"
#: models.py:78 #: admin_interface/models.py:80
msgid "logo" msgid "logo"
msgstr "logo" msgstr "logo"
#: models.py:84 #: admin_interface/models.py:94
msgid "logo color"
msgstr "colore del logo"
#: models.py:92
msgid "(.ico|.png|.gif - 16x16|32x32 px)" msgid "(.ico|.png|.gif - 16x16|32x32 px)"
msgstr "Formato ico, png o gif. Dimensioni 16x16 o 32x32 px" msgstr "(formato ico, png o gif - dimensioni 16x16 o 32x32 px)"
#: models.py:93 #: admin_interface/models.py:95
msgid "favicon" msgid "favicon"
msgstr "favicon" msgstr "favicon"
#: models.py:96 #: admin_interface/models.py:104
msgid "Development" msgid ""
msgstr "Sviluppo" "(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: "
"#3498DB)"
msgstr ""
"(rosso: #E74C3C, arancione: #E67E22, giallo: #F1C40F, verde: #2ECC71, blu: "
"#3498DB)"
#: models.py:97 #: admin_interface/models.py:109
msgid "Testing" msgid "visible in header (marker and name)"
msgstr "Testing" msgstr "visibile nell'header (marker e nome)"
#: models.py:98 #: admin_interface/models.py:112
msgid "Staging" msgid "visible in favicon (marker)"
msgstr "Staging" msgstr "visibile nella favicon (marker)"
#: models.py:99 #: admin_interface/models.py:119 admin_interface/models.py:144
msgid "Production" #: admin_interface/models.py:185 admin_interface/models.py:204
msgstr "Produzione" #: admin_interface/models.py:230
#: models.py:105
msgid "environment"
msgstr "ambiente"
#: models.py:115 models.py:140 models.py:181 models.py:200 models.py:226
msgid "background color" msgid "background color"
msgstr "colore di sfondo" msgstr "colore di sfondo"
#: models.py:121 models.py:146 models.py:193 models.py:212 models.py:216 #: admin_interface/models.py:125 admin_interface/models.py:150
#: admin_interface/models.py:197 admin_interface/models.py:216
#: admin_interface/models.py:220
msgid "text color" msgid "text color"
msgstr "color del testo" msgstr "colore del testo"
#: models.py:127 models.py:152 models.py:168 #: admin_interface/models.py:131 admin_interface/models.py:156
#: admin_interface/models.py:172
msgid "link color" msgid "link color"
msgstr "color dei link" msgstr "colore dei link"
#: models.py:133 models.py:158 models.py:174 #: admin_interface/models.py:137 admin_interface/models.py:162
#: admin_interface/models.py:178
msgid "link hover color" msgid "link hover color"
msgstr "color dei link in hover" msgstr "colore dei link in hover"
#: models.py:161 models.py:246 #: admin_interface/models.py:165 admin_interface/models.py:250
msgid "rounded corners" msgid "rounded corners"
msgstr "bordi arrotondati" msgstr "bordi arrotondati"
#: models.py:187 models.py:206 #: admin_interface/models.py:191 admin_interface/models.py:210
msgid "background hover color" msgid "background hover color"
msgstr "colore di sfondo in hover" msgstr "colore di sfondo in hover"
#: models.py:243 #: admin_interface/models.py:247
msgid "background opacity" msgid "background opacity"
msgstr "opacità dello sfondo" msgstr "opacità dello sfondo"
#: models.py:250 #: admin_interface/models.py:253
msgid "use dropdown" msgid "close button visible"
msgstr "Usa dropdown" msgstr "pulsante chiudi visibile"
#: models.py:262 #: admin_interface/models.py:257
msgid "use dropdown"
msgstr "usa dropdown"
#: admin_interface/models.py:269
msgid "Theme" msgid "Theme"
msgstr "Tema" msgstr "Tema"
#: models.py:263 #: admin_interface/models.py:270
msgid "Themes" msgid "Themes"
msgstr "Temi" msgstr "Temi"
#: templates/admin/filter.html:13 #: admin_interface/templates/admin/filter.html:13
#: templates/admin_interface/dropdown_filter.html:4 #: admin_interface/templates/admin_interface/dropdown_filter.html:4
#, python-format #, python-format
msgid " By %(filter_title)s " msgid " By %(filter_title)s "
msgstr " Per %(filter_title)s " msgstr " Per %(filter_title)s "
#: templates/admin/popup_response.html:3 #: admin_interface/templates/admin/popup_response.html:3
msgid "Popup closing..." msgid "Popup closing..."
msgstr "Chiusura popup..." msgstr "Chiusura popup..."
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import colorfield.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('admin_interface', '0010_add_localization'),
]
operations = [
migrations.RenameField(
model_name='theme',
old_name='env',
new_name='env_name',
),
migrations.AlterField(
model_name='theme',
name='env_name',
field=models.CharField(
blank=True,
max_length=50,
verbose_name='name'),
),
migrations.AddField(
model_name='theme',
name='env_color',
field=colorfield.fields.ColorField(
blank=True,
default='#E74C3C',
help_text='(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)',
max_length=10,
verbose_name='color'),
),
migrations.RenameField(
model_name='theme',
old_name='env_visible',
new_name='env_visible_in_header',
),
migrations.AlterField(
model_name='theme',
name='env_visible_in_header',
field=models.BooleanField(
default=True,
verbose_name='visible in header (marker and name)'),
),
migrations.AddField(
model_name='theme',
name='env_visible_in_favicon',
field=models.BooleanField(
default=True,
verbose_name='visible in favicon (marker)'),
),
]
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import colorfield.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('admin_interface', '0011_add_environment_options'),
]
operations = [
migrations.AlterField(
model_name='theme',
name='logo_color',
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='color'),
),
migrations.AlterField(
model_name='theme',
name='title_color',
field=colorfield.fields.ColorField(blank=True, default='#F5DD5D', help_text='#F5DD5D', max_length=10, verbose_name='color'),
),
]
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('admin_interface', '0012_update_verbose_names'),
]
operations = [
migrations.AddField(
model_name='theme',
name='related_modal_close_button_visible',
field=models.BooleanField(default=True, verbose_name='close button visible'),
),
]
+20 -29
View File
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import unicode_literals from __future__ import unicode_literals
from django.db import models from django.db import models
@@ -67,7 +68,7 @@ class Theme(models.Model):
default='#F5DD5D', default='#F5DD5D',
help_text='#F5DD5D', help_text='#F5DD5D',
max_length=10, max_length=10,
verbose_name=_('title color')) verbose_name=_('color'))
title_visible = models.BooleanField( title_visible = models.BooleanField(
default=True, default=True,
verbose_name=_('visible')) verbose_name=_('visible'))
@@ -82,7 +83,7 @@ class Theme(models.Model):
default='#FFFFFF', default='#FFFFFF',
help_text='#FFFFFF', help_text='#FFFFFF',
max_length=10, max_length=10,
verbose_name=_('logo color')) verbose_name=_('color'))
logo_visible = models.BooleanField( logo_visible = models.BooleanField(
default=True, default=True,
verbose_name=_('visible')) verbose_name=_('visible'))
@@ -93,35 +94,22 @@ class Theme(models.Model):
help_text=_('(.ico|.png|.gif - 16x16|32x32 px)'), help_text=_('(.ico|.png|.gif - 16x16|32x32 px)'),
verbose_name=_('favicon')) verbose_name=_('favicon'))
envs = ( env_name = models.CharField(
'development', blank=True,
'testing',
'staging',
'production',
)
env_choices = (
(envs[0], _('Development'), ),
(envs[1], _('Testing'), ),
(envs[2], _('Staging'), ),
(envs[3], _('Production'), ),
)
env = models.CharField(
max_length=50, max_length=50,
choices=env_choices, verbose_name=_('name'))
default=env_choices[0][0], env_color = ColorField(
verbose_name=_('environment')) blank=True,
env_visible = models.BooleanField( default='#E74C3C',
help_text=_('(red: #E74C3C, orange: #E67E22, yellow: #F1C40F, green: #2ECC71, blue: #3498DB)'),
max_length=10,
verbose_name=_('color'))
env_visible_in_header = models.BooleanField(
default=True, default=True,
verbose_name=_('visible')) verbose_name=_('visible in header (marker and name)'))
env_colors = { env_visible_in_favicon = models.BooleanField(
envs[0]: '#e74c3c', default=True,
envs[1]: '#e67e22', verbose_name=_('visible in favicon (marker)'))
envs[2]: '#f1c40f',
envs[3]: '#2ecc71',
}
@property
def env_color(self):
return Theme.env_colors.get(self.env, '')
css_header_background_color = ColorField( css_header_background_color = ColorField(
blank=True, blank=True,
@@ -260,6 +248,9 @@ class Theme(models.Model):
related_modal_rounded_corners = models.BooleanField( related_modal_rounded_corners = models.BooleanField(
default=True, default=True,
verbose_name=_('rounded corners')) verbose_name=_('rounded corners'))
related_modal_close_button_visible = models.BooleanField(
default=True,
verbose_name=_('close button visible'))
list_filter_dropdown = models.BooleanField( list_filter_dropdown = models.BooleanField(
default=False, default=False,
@@ -78,7 +78,10 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
} }
// build the iframe html // build the iframe html
var iframeHTML = '<iframe id="related-modal-iframe" name="' + iframeName + '" src="' + iframeSrc + '"></iframe>'; var iframeHTML = '<div class="related-modal-iframe-container">' +
'<iframe id="related-modal-iframe" name="' + iframeName + '" src="' + iframeSrc + '"></iframe>' +
'</div>';
// create the iframe jquery element // create the iframe jquery element
var iframeEl = $(iframeHTML); var iframeEl = $(iframeHTML);
@@ -105,6 +108,8 @@ if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
// open the popup using magnific popup // open the popup using magnific popup
$.magnificPopup.open({ $.magnificPopup.open({
mainClass: iframeInternalModalClass, mainClass: iframeInternalModalClass,
showCloseBtn: true,
closeBtnInside: true,
items: { items: {
src: iframeEl, src: iframeEl,
type: 'inline' type: 'inline'
@@ -64,5 +64,5 @@ https://github.com/fabiocaccamo/django-admin-interface
{% block welcome-msg %} {% block welcome-msg %}
{% get_admin_interface_theme as theme %} {% get_admin_interface_theme as theme %}
{% if theme.env_visible %}<span class="enviroment-label {{ theme.env }}"></span> - {% endif %}{{ block.super }}<br> {% if theme.env_visible_in_header %}<span class="enviroment-label {{ theme.env_name }}"></span> - {% endif %}{{ block.super }}<br>
{% endblock %} {% endblock %}
@@ -11,7 +11,7 @@
display: inline-block; display: inline-block;
width: 8px; width: 8px;
height: 8px; height: 8px;
background-color: #CCCCCC; background-color: {{ theme.env_color }};
border-radius: 100%; border-radius: 100%;
margin-right: 6px; margin-right: 6px;
box-sizing: border-box; box-sizing: border-box;
@@ -19,44 +19,12 @@
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
} }
.admin-interface .enviroment-label.development::before {
background-color: {{ theme.env_colors.development }};
}
.admin-interface .enviroment-label.testing::before {
background-color: {{ theme.env_colors.testing }};
}
.admin-interface .enviroment-label.staging::before {
background-color: {{ theme.env_colors.staging }};
}
.admin-interface .enviroment-label.production::before {
background-color: {{ theme.env_colors.production }};
}
.admin-interface .enviroment-label::after { .admin-interface .enviroment-label::after {
content: ""; content: "{{ theme.env_name }}";
}
.admin-interface .enviroment-label.development::after {
content: "development";
}
.admin-interface .enviroment-label.testing::after {
content: "testing";
}
.admin-interface .enviroment-label.staging::after {
content: "staging";
}
.admin-interface .enviroment-label.production::after {
content: "production";
} }
.admin-interface #branding h1 { .admin-interface #branding h1 {
color:{{ theme.title_color }}; color: {{ theme.title_color }};
} }
.admin-interface #branding h1 .logo.default { .admin-interface #branding h1 .logo.default {
@@ -3,38 +3,56 @@ related modal + magnific popup customization
https://github.com/dimsemenov/Magnific-Popup https://github.com/dimsemenov/Magnific-Popup
*/ */
.admin-interface .related-modal.mfp-bg { .admin-interface .related-modal.mfp-bg {
background-color:{{ theme.related_modal_background_color }}; background-color: {{ theme.related_modal_background_color }};
opacity: {{ theme.related_modal_background_opacity }}; opacity: {{ theme.related_modal_background_opacity }};
} }
.admin-interface .related-modal .mfp-content { .admin-interface .related-modal .mfp-content {
height: 100%; height: 100%;
overflow: hidden;
{% if theme.related_modal_rounded_corners %}
border-radius: 4px;
{% endif %}
-webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2); -webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2); -moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2); box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.2);
} }
.admin-interface .related-modal .mfp-container { .admin-interface .related-modal .mfp-container {
padding: 90px 90px 90px 90px; padding: 80px 80px 80px 80px;
} }
.admin-interface .related-modal__nested .mfp-container { .admin-interface .related-modal__nested .mfp-container {
padding: 30px 60px 30px 60px; padding: 40px 80px 40px 80px;
} }
@media (max-width:640px){ @media (max-width:640px){
.admin-interface .related-modal .mfp-container { .admin-interface .related-modal .mfp-container {
padding: 60px 15px 60px 15px; padding: 80px 20px 80px 20px;
} }
.admin-interface .related-modal__nested .mfp-container { .admin-interface .related-modal__nested .mfp-container {
padding: 30px 30px 30px 30px; padding: 40px 40px 40px 40px;
} }
} }
@media (max-height:640px){
.admin-interface .related-modal .mfp-container {
padding-top: 20px;
padding-bottom: 20px;
}
.admin-interface .related-modal__nested .mfp-container {
padding: 40px 40px 40px 40px;
}
}
.admin-interface .related-modal .related-modal-iframe-container {
display: block;
width: 100%;
height: 100%;
position: relative;
z-index: 100;
overflow: hidden;
{% if theme.related_modal_rounded_corners %}
border-radius: 4px;
{% endif %}
}
.admin-interface .related-modal #related-modal-iframe { .admin-interface .related-modal #related-modal-iframe {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -48,3 +66,19 @@ https://github.com/dimsemenov/Magnific-Popup
padding: 0; padding: 0;
display: block; display: block;
} }
.admin-interface .related-modal .mfp-close {
width: 40px;
height: 40px;
opacity: 1.0;
color: rgba(0, 0, 0, 0.4);
{% if not theme.related_modal_close_button_visible %}
display: none;
{% endif %}
}
.admin-interface .related-modal .mfp-close:hover,
.admin-interface .related-modal .mfp-close:active {
color: rgba(0, 0, 0, 0.6);
top: 0;
}
@@ -2,7 +2,7 @@
{% if theme.favicon %} {% if theme.favicon %}
<link rel="icon" type="image/x-icon" href="{{ theme.favicon.url }}?v={{ version }}" /> <link rel="icon" type="image/x-icon" href="{{ theme.favicon.url }}?v={{ version }}" />
{% if theme.env_visible %} {% if theme.env_visible_in_favicon %}
<script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?v={{ version }}"></script> <script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?v={{ version }}"></script>
<script type="text/javascript"> <script type="text/javascript">
var favicon = new Favico({ var favicon = new Favico({
+1 -1
View File
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
__version__ = '0.9.3' __version__ = '0.10.0'