diff --git a/HISTORY.rst b/HISTORY.rst index 04bb4617b5..92b7b68622 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -113,7 +113,8 @@ * Fix issue installing scoped NPM packages. * Add new icons classes and templates. * Add support for link icon path imports. - +* Remove support for link icon strings. + 3.1.11 (2019-04-XX) =================== * Fix multiple tag selection wizard step. diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index e70096b68f..aaa683e935 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -145,6 +145,7 @@ Other changes * Fix issue installing scoped NPM packages. * Add new icons classes and templates. * Add support for link icon path imports. +* Remove support for link icon strings. Removals -------- diff --git a/mayan/apps/common/classes.py b/mayan/apps/common/classes.py index a2a0ec7d3c..8a957de734 100644 --- a/mayan/apps/common/classes.py +++ b/mayan/apps/common/classes.py @@ -20,9 +20,11 @@ class Collection(object): def get_all(cls): return sorted(cls._registry, key=lambda entry: entry._order) - def __init__(self, label, icon=None, icon_class=None, link=None, queryset=None, model=None, order=None): + def __init__( + self, label, icon_class=None, link=None, queryset=None, model=None, + order=None + ): self._label = label - self._icon = icon self._icon_class = icon_class self._link = link self._queryset = queryset @@ -39,7 +41,6 @@ class Collection(object): self.label = self._label self.url = None if self._link: - self.icon = getattr(self._link, 'icon', self._icon) self.icon_class = getattr(self._link, 'icon_class', self._icon_class) self.url = reverse(viewname=self._link.view, args=self._link.args) return '' diff --git a/mayan/apps/navigation/templates/navigation/generic_link_instance.html b/mayan/apps/navigation/templates/navigation/generic_link_instance.html index 23c3cc88ab..6a99960826 100644 --- a/mayan/apps/navigation/templates/navigation/generic_link_instance.html +++ b/mayan/apps/navigation/templates/navigation/generic_link_instance.html @@ -4,7 +4,7 @@ {% else %} {% if link.disabled %} - {% if link.icon %}{% endif %}{% if link.icon_class %}{{ link.icon_class.render }}{% endif %} {{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} + {% if link.icon_class %}{{ link.icon_class.render }}{% endif %} {{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}{% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} {% else %} {% if link.icon %}{% if not hide_icon %} - - {% endif %}{% endif %} - {% if link.icon_class and not hide_icon %}{{ link.icon_class.render }}{% endif %} + >{% if link.icon_class and not hide_icon %}{{ link.icon_class.render }}{% endif %} {{ link.text|default:'' }}{% if link.badge_text %} {{ link.badge_text }} {% endif %}{% if link.error %} - {{ link.error }}{% endif %} {% if horizontal %}{% if not forloop.last %} {% endif %}{% endif %} diff --git a/mayan/apps/navigation/templates/navigation/generic_subnavigation.html b/mayan/apps/navigation/templates/navigation/generic_subnavigation.html index 4ef6b954c1..fb9cc2603a 100644 --- a/mayan/apps/navigation/templates/navigation/generic_subnavigation.html +++ b/mayan/apps/navigation/templates/navigation/generic_subnavigation.html @@ -4,9 +4,6 @@ {% if link|get_type == "" %}