summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py1
-rw-r--r--ishtar_common/static/media/style.css4
-rw-r--r--ishtar_common/templatetags/link_to_window.py2
-rw-r--r--ishtar_common/utils.py5
4 files changed, 12 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index c536b64ae..186d88f1a 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2200,6 +2200,7 @@ pre_delete.connect(pre_delete_import, sender=Import)
class Organization(Address, Merge, OwnPerms, ValueGetter):
TABLE_COLS = ('name', 'organization_type',)
+ SHOW_URL = 'show-organization'
name = models.CharField(_(u"Name"), max_length=500)
organization_type = models.ForeignKey(OrganizationType,
verbose_name=_(u"Type"))
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index 02f4d930b..7dd424974 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -1276,6 +1276,10 @@ table.table-form td input{
border-color:#922;
}
+.clean-table.small {
+ width: auto;
+}
+
.clean-table {
margin: 10px 0 10px 0;
width: 100%;
diff --git a/ishtar_common/templatetags/link_to_window.py b/ishtar_common/templatetags/link_to_window.py
index 288bfcd8a..93924b77a 100644
--- a/ishtar_common/templatetags/link_to_window.py
+++ b/ishtar_common/templatetags/link_to_window.py
@@ -10,6 +10,8 @@ register = Library()
@register.filter
def link_to_window(item):
+ if not item:
+ return ""
return mark_safe(
u' <a class="display_details" href="#" '
u'onclick="load_window(\'{}\')">'
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index 9fe7a3a00..d4973012e 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -56,3 +56,8 @@ def shortify(lbl, number=20):
if len(lbl) <= number:
return lbl
return lbl[:number - len(SHORTIFY_STR)] + SHORTIFY_STR
+
+
+def mode(array):
+ most = max(list(map(array.count, array)))
+ return list(set(filter(lambda x: array.count(x) == most, array)))