Merge branch 'feature/remove_source_icons' into development
This commit is contained in:
BIN
docs/_static/mayan-login.png
vendored
BIN
docs/_static/mayan-login.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB |
BIN
docs/_static/no-icons.png
vendored
BIN
docs/_static/no-icons.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 119 KiB |
BIN
docs/_static/themes.png
vendored
BIN
docs/_static/themes.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 149 KiB |
@@ -2,32 +2,6 @@
|
||||
Customization
|
||||
=============
|
||||
|
||||
The general appearance of **Mayan EDMS** can be customized entirely just
|
||||
by changing a few settings.
|
||||
|
||||
------
|
||||
Themes
|
||||
------
|
||||
**Mayan EDMS** uses `Andrea Franz's excellent web app template`_, which includes
|
||||
several themes that could be used to adapt **Mayan EDMS**'s appearance to match
|
||||
an organtization existing applications' look and feel.
|
||||
|
||||
The theme can be changed very easily by setting the :setting:`WEB_THEME_THEME`
|
||||
configuration option to one of its valid values.
|
||||
|
||||
.. image:: ../_static/themes.png
|
||||
:alt: themes
|
||||
|
||||
------------
|
||||
Login screen
|
||||
------------
|
||||
The amount of information presented at the login screen can also be restricted
|
||||
for security or design reasons using :setting:`WEB_THEME_VERBOSE_LOGIN`
|
||||
configuration option.
|
||||
|
||||
.. image:: ../_static/mayan-login.png
|
||||
:alt: mayan login screen
|
||||
|
||||
-----------
|
||||
Home screen
|
||||
-----------
|
||||
@@ -36,14 +10,4 @@ a home screen. For these kind of situations **Mayan EDMS** has the
|
||||
:setting:`MAIN_DISABLE_HOME_VIEW` configuration option, which will cause
|
||||
users to land on their ``recent document list`` as soon as they log in.
|
||||
|
||||
-----
|
||||
Icons
|
||||
-----
|
||||
Some themes such as ``default`` might be more visually appealing to some
|
||||
people without the menu icons, for this **Mayan EDMS** provides the
|
||||
:setting:`MAIN_DISABLE_ICONS` configuration option.
|
||||
|
||||
.. image:: ../_static/no-icons.png
|
||||
:alt: mayan screens with out icons
|
||||
|
||||
.. _`Andrea Franz's excellent web app template`: https://github.com/pilu/web-app-theme
|
||||
|
||||
@@ -459,29 +459,6 @@ Default: ``5``
|
||||
Maximum number of search queries to remember per user.
|
||||
|
||||
|
||||
Web theme
|
||||
=========
|
||||
|
||||
.. setting:: WEB_THEME_THEME
|
||||
|
||||
**WEB_THEME_THEME**
|
||||
|
||||
Default: ``activo``
|
||||
|
||||
CSS theme to apply, options are: ``amro``, ``bec``, ``bec-green``, ``blue``,
|
||||
``default``, ``djime-cerulean``, ``drastic-dark``, ``kathleene``, ``olive``,
|
||||
``orange``, ``red``, ``reidb-greenish`` and ``warehouse``.
|
||||
|
||||
|
||||
.. setting:: WEB_THEME_VERBOSE_LOGIN
|
||||
|
||||
**WEB_THEME_VERBOSE_LOGIN**
|
||||
|
||||
Default: ``True``
|
||||
|
||||
Display extra information in the login screen.
|
||||
|
||||
|
||||
Main
|
||||
====
|
||||
|
||||
@@ -494,15 +471,6 @@ Default: ``False``
|
||||
Disable the home view and redirect users straight to the recent document list as soon as they log in.
|
||||
|
||||
|
||||
.. setting:: MAIN_DISABLE_ICONS
|
||||
|
||||
**MAIN_DISABLE_ICONS**
|
||||
|
||||
Default: ``False``
|
||||
|
||||
Turns off navigation links' icons.
|
||||
|
||||
|
||||
User management
|
||||
===============
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from navigation.api import register_top_menu
|
||||
from project_setup.api import register_setup
|
||||
from project_tools.api import register_tool
|
||||
|
||||
from .links import admin_site, diagnostics, maintenance_menu, sentry
|
||||
from .links import admin_site, diagnostics, maintenance_menu
|
||||
from .settings import DISABLE_HOME_VIEW
|
||||
|
||||
if not DISABLE_HOME_VIEW:
|
||||
@@ -18,7 +18,3 @@ if 'django.contrib.admin' in django_settings.INSTALLED_APPS:
|
||||
|
||||
register_tool(diagnostics)
|
||||
register_tool(maintenance_menu)
|
||||
|
||||
# TODO: Remove this
|
||||
if 'sentry' in django_settings.INSTALLED_APPS:
|
||||
register_tool(sentry)
|
||||
|
||||
@@ -7,5 +7,4 @@ def is_superuser(context):
|
||||
|
||||
maintenance_menu = {'text': _(u'Maintenance'), 'view': 'main:maintenance_menu', 'famfam': 'wrench', 'icon': 'wrench.png'}
|
||||
diagnostics = {'text': _(u'Diagnostics'), 'view': 'main:diagnostics', 'famfam': 'pill', 'icon': 'pill.png'}
|
||||
sentry = {'text': _(u'Sentry'), 'view': 'main:sentry', 'famfam': 'bug', 'icon': 'bug.png', 'condition': is_superuser}
|
||||
admin_site = {'text': _(u'Admin site'), 'view': 'admin:index', 'famfam': 'keyboard', 'icon': 'keyboard.png', 'condition': is_superuser}
|
||||
|
||||
@@ -11,20 +11,10 @@ register_setting(
|
||||
default=False,
|
||||
)
|
||||
|
||||
register_setting(
|
||||
namespace=u'main',
|
||||
module=u'main.settings',
|
||||
name=u'DISABLE_ICONS',
|
||||
global_name=u'MAIN_DISABLE_ICONS',
|
||||
default=False,
|
||||
)
|
||||
|
||||
register_settings(
|
||||
namespace=u'main',
|
||||
module=u'main.settings',
|
||||
settings=[
|
||||
{'name': u'THEME', 'global_name': u'MAIN_THEME', 'default': u'activo', 'description': _(u'CSS theme to apply, options are: amro, bec, bec-green, blue, default, djime-cerulean, drastic-dark, kathleene, olive, orange, red, reidb-greenish and warehouse.')},
|
||||
{'name': u'ENABLE_SCROLL_JS', 'global_name': u'MAIN_ENABLE_SCROLL_JS', 'default': True, 'hidden': True},
|
||||
{'name': u'VERBOSE_LOGIN', 'global_name': u'MAIN_VERBOSE_LOGIN', 'default': True, 'description': _(u'Display extra information in the login screen.')},
|
||||
]
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" href="{% static 'web_theme_media/stylesheets/base.css' %}" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" id="current-theme" href="{{ STATIC_URL }}web_theme_media/stylesheets/themes/{{ web_theme|default:'activo' }}/style.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="{% static 'web_theme_media/stylesheets/themes/activo/style.css' %}" type="text/css" media="screen" />
|
||||
<style type="text/css">
|
||||
.message span.dismiss {
|
||||
padding:0 5px;
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
{% load variable_tags %}
|
||||
{% load main_settings_tags %}
|
||||
|
||||
{% get_main_setting 'DISABLE_ICONS' as disable_icons %}
|
||||
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
@@ -37,7 +35,7 @@
|
||||
<div class="group navform wat-cf">
|
||||
{% for link in multi_item_links %}
|
||||
<button class="button" type="submit" name="action" value="{{ link.url }}">
|
||||
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -75,7 +73,7 @@
|
||||
<div class="group navform wat-cf">
|
||||
{% for link in multi_item_links %}
|
||||
<button class="button" type="submit" name="action" value="{{ link.url }}">
|
||||
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
{% load main_settings_tags %}
|
||||
{% load multiselect_tags %}
|
||||
|
||||
{% get_main_setting 'DISABLE_ICONS' as disable_icons %}
|
||||
|
||||
{% if side_bar %}
|
||||
<div class="block">
|
||||
<h3>
|
||||
@@ -40,7 +38,7 @@
|
||||
<div class="group navform wat-cf" style="margin-bottom: 0px;">
|
||||
{% for link in multi_item_links %}
|
||||
<button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;">
|
||||
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -160,7 +158,7 @@
|
||||
<div class="group navform wat-cf" style="margin-bottom: 0px;">
|
||||
{% for link in multi_item_links %}
|
||||
<button class="button" type="submit" name="action" value="{{ link.url }}" style="margin-bottom: 8px;">
|
||||
{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -66,10 +66,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% get_web_theme_setting "VERBOSE_LOGIN" as verbose_login %}
|
||||
{% if verbose_login %}
|
||||
{% include 'main/verbose_login.html' %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% load version_tags %}
|
||||
|
||||
<p>{% trans 'Version' %} {% app_version 'mayan' %}</p>
|
||||
|
||||
<p>{% trans 'Copyright © 2011 Roberto Rosario.' %}</p>
|
||||
|
||||
{% include 'main/project_description.html' %}
|
||||
|
||||
@@ -16,7 +16,6 @@ class GetThemeNode(Node):
|
||||
self.var_name = var_name
|
||||
|
||||
def render(self, context):
|
||||
context['web_theme'] = web_theme_settings.THEME
|
||||
context['enable_scroll_js'] = web_theme_settings.ENABLE_SCROLL_JS
|
||||
return ''
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{% load main_settings_tags %}
|
||||
|
||||
{% get_main_setting "DISABLE_ICONS" as disable_icons %}
|
||||
|
||||
{% if link.disabled %}
|
||||
<a class="{{ link.class }}" style="cursor: default;" href="#">{% if link.famfam and not disable_icons %}<span class="famfam inactive famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
|
||||
<a class="{{ link.class }}" style="cursor: default;" href="#">{% if link.famfam %}<span class="famfam inactive famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
|
||||
{% else %}
|
||||
<a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam and not disable_icons %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
|
||||
<a class="{{ link.class }}" href="{{ link.url }}">{% if link.famfam %}<span class="famfam active famfam-{{ link.famfam|default:'link' }}"></span>{% endif %}{{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if link.active and not hide_active_anchor %}<span class="famfam active famfam-resultset_previous"></span>{% endif %}</a>{% if horizontal %}{% if not forloop.last %} | {% endif %}{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -76,25 +76,11 @@ class WebFormForm(DocumentForm):
|
||||
|
||||
|
||||
class WebFormSetupForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(WebFormSetupForm, self).__init__(*args, **kwargs)
|
||||
self.fields['icon'].widget = FamFamRadioSelect(
|
||||
attrs=self.fields['icon'].widget.attrs,
|
||||
choices=self.fields['icon'].widget.choices,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = WebForm
|
||||
|
||||
|
||||
class StagingFolderSetupForm(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(StagingFolderSetupForm, self).__init__(*args, **kwargs)
|
||||
self.fields['icon'].widget = FamFamRadioSelect(
|
||||
attrs=self.fields['icon'].widget.attrs,
|
||||
choices=self.fields['icon'].widget.choices,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = StagingFolder
|
||||
|
||||
|
||||
@@ -15,30 +15,6 @@ SOURCE_INTERACTIVE_UNCOMPRESS_CHOICES = (
|
||||
(SOURCE_UNCOMPRESS_CHOICE_ASK, _(u'Ask user'))
|
||||
)
|
||||
|
||||
SOURCE_ICON_DISK = 'disk'
|
||||
SOURCE_ICON_DATABASE = 'database'
|
||||
SOURCE_ICON_DRIVE = 'drive'
|
||||
SOURCE_ICON_DRIVE_NETWORK = 'drive_network'
|
||||
SOURCE_ICON_DRIVE_USER = 'drive_user'
|
||||
SOURCE_ICON_EMAIL = 'email'
|
||||
SOURCE_ICON_FOLDER = 'folder'
|
||||
SOURCE_ICON_WORLD = 'world'
|
||||
SOURCE_ICON_PRINTER = 'printer'
|
||||
SOURCE_ICON_PRINTER_EMPTY = 'printer_empty'
|
||||
|
||||
SOURCE_ICON_CHOICES = (
|
||||
(SOURCE_ICON_DISK, _(u'Disk')),
|
||||
(SOURCE_ICON_DATABASE, _(u'Database')),
|
||||
(SOURCE_ICON_DRIVE, _(u'Drive')),
|
||||
(SOURCE_ICON_DRIVE_NETWORK, _(u'Network drive')),
|
||||
(SOURCE_ICON_DRIVE_USER, _(u'User drive')),
|
||||
(SOURCE_ICON_EMAIL, _(u'Envelope')),
|
||||
(SOURCE_ICON_FOLDER, _(u'Folder')),
|
||||
(SOURCE_ICON_WORLD, _(u'World')),
|
||||
(SOURCE_ICON_PRINTER, _(u'Printer')),
|
||||
(SOURCE_ICON_PRINTER_EMPTY, _(u'Empty printer')),
|
||||
)
|
||||
|
||||
SOURCE_CHOICE_WEB_FORM = 'webform'
|
||||
SOURCE_CHOICE_STAGING = 'staging'
|
||||
SOURCE_CHOICE_WATCH = 'watch'
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from south.utils import datetime_utils as datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Deleting field 'StagingFolder.icon'
|
||||
db.delete_column(u'sources_stagingfolder', 'icon')
|
||||
|
||||
# Deleting field 'WebForm.icon'
|
||||
db.delete_column(u'sources_webform', 'icon')
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Adding field 'StagingFolder.icon'
|
||||
db.add_column(u'sources_stagingfolder', 'icon',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=24, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'WebForm.icon'
|
||||
db.add_column(u'sources_webform', 'icon',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=24, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
models = {
|
||||
u'contenttypes.contenttype': {
|
||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
},
|
||||
u'sources.outofprocess': {
|
||||
'Meta': {'ordering': "('title',)", 'object_name': 'OutOfProcess'},
|
||||
'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
|
||||
'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
},
|
||||
u'sources.sourcetransformation': {
|
||||
'Meta': {'ordering': "('order',)", 'object_name': 'SourceTransformation'},
|
||||
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
|
||||
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||
},
|
||||
u'sources.stagingfolder': {
|
||||
'Meta': {'ordering': "('title',)", 'object_name': 'StagingFolder'},
|
||||
'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'delete_after_upload': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'folder_path': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'preview_height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
|
||||
'preview_width': ('django.db.models.fields.IntegerField', [], {}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
|
||||
'uncompress': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
|
||||
'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
},
|
||||
u'sources.watchfolder': {
|
||||
'Meta': {'ordering': "('title',)", 'object_name': 'WatchFolder'},
|
||||
'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'delete_after_upload': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'folder_path': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'interval': ('django.db.models.fields.PositiveIntegerField', [], {}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
|
||||
'uncompress': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
|
||||
'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
},
|
||||
u'sources.webform': {
|
||||
'Meta': {'ordering': "('title',)", 'object_name': 'WebForm'},
|
||||
'blacklist': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
|
||||
'uncompress': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
|
||||
'whitelist': ('django.db.models.fields.TextField', [], {'blank': 'True'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['sources']
|
||||
@@ -23,10 +23,10 @@ from scheduler.api import register_interval_job, remove_job
|
||||
|
||||
from .classes import StagingFile
|
||||
from .literals import (SOURCE_CHOICES, SOURCE_CHOICES_PLURAL,
|
||||
SOURCE_INTERACTIVE_UNCOMPRESS_CHOICES, SOURCE_CHOICE_WEB_FORM,
|
||||
SOURCE_CHOICE_STAGING, SOURCE_ICON_DISK, SOURCE_ICON_DRIVE,
|
||||
SOURCE_ICON_CHOICES, SOURCE_CHOICE_WATCH, SOURCE_UNCOMPRESS_CHOICES,
|
||||
SOURCE_UNCOMPRESS_CHOICE_Y)
|
||||
SOURCE_CHOICE_STAGING, SOURCE_CHOICE_WATCH,
|
||||
SOURCE_CHOICE_WEB_FORM,
|
||||
SOURCE_INTERACTIVE_UNCOMPRESS_CHOICES,
|
||||
SOURCE_UNCOMPRESS_CHOICES, SOURCE_UNCOMPRESS_CHOICE_Y)
|
||||
from .managers import SourceTransformationManager
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -141,13 +141,6 @@ class BaseModel(models.Model):
|
||||
|
||||
|
||||
class InteractiveBaseModel(BaseModel):
|
||||
icon = models.CharField(blank=True, null=True, max_length=24, choices=SOURCE_ICON_CHOICES, verbose_name=_(u'Icon'), help_text=_(u'An icon to visually distinguish this source.'))
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.icon:
|
||||
self.icon = self.default_icon
|
||||
super(BaseModel, self).save(*args, **kwargs)
|
||||
|
||||
class Meta(BaseModel.Meta):
|
||||
abstract = True
|
||||
|
||||
@@ -155,7 +148,6 @@ class InteractiveBaseModel(BaseModel):
|
||||
class StagingFolder(InteractiveBaseModel):
|
||||
is_interactive = True
|
||||
source_type = SOURCE_CHOICE_STAGING
|
||||
default_icon = SOURCE_ICON_DRIVE
|
||||
|
||||
folder_path = models.CharField(max_length=255, verbose_name=_(u'Folder path'), help_text=_(u'Server side filesystem path.'))
|
||||
preview_width = models.IntegerField(verbose_name=_(u'Preview width'), help_text=_(u'Width value to be passed to the converter backend.'))
|
||||
@@ -189,7 +181,6 @@ class StagingFolder(InteractiveBaseModel):
|
||||
class WebForm(InteractiveBaseModel):
|
||||
is_interactive = True
|
||||
source_type = SOURCE_CHOICE_WEB_FORM
|
||||
default_icon = SOURCE_ICON_DISK
|
||||
|
||||
uncompress = models.CharField(max_length=1, choices=SOURCE_INTERACTIVE_UNCOMPRESS_CHOICES, verbose_name=_(u'Uncompress'), help_text=_(u'Whether to expand or not compressed archives.'))
|
||||
# Default path
|
||||
|
||||
@@ -67,7 +67,6 @@ def get_tab_link_for_source(source, document=None):
|
||||
'text': source.title,
|
||||
'view': view,
|
||||
'args': args,
|
||||
'famfam': source.icon,
|
||||
'keep_query': True,
|
||||
'conditional_highlight': return_function(source),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user