Skip to content

Commit

Permalink
GH-88: SystemSpecs: Fix Dup. Internal Link Opt
Browse files Browse the repository at this point in the history
Do not let "Internal Link" have duplicate options.
  • Loading branch information
wesleyboar committed Aug 6, 2021
1 parent 77c5040 commit ed72de7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion taccsite_cms/contrib/taccsite_system_specs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Problems to Fix

- [ ] Prevent duplicate entires in "Internal Link".
- [x] Prevent duplicate entires in "Internal Link".
- [ ] Add missing link feature to "Data List Item" plugin. → GH-75
- [ ] Find makeshift way to list dependency plugins i.e. taccsite_data_list.

Expand Down
7 changes: 5 additions & 2 deletions taccsite_cms/contrib/taccsite_system_specs/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import gettext_lazy as _

from djangocms_link.cms_plugins import LinkPlugin

from taccsite_cms.contrib.helpers import concat_classnames
from taccsite_cms.contrib.taccsite_offset.cms_plugins import get_direction_classname

Expand All @@ -10,14 +11,16 @@
from .models import TaccsiteSystemSpecs

@plugin_pool.register_plugin
class TaccsiteSystemSpecsPlugin(CMSPluginBase):
class TaccsiteSystemSpecsPlugin(LinkPlugin):
"""
Components > "System Specs" Plugin
"""
module = 'TACC Site'
model = TaccsiteSystemSpecs
name = _('System Specs')
render_template = 'system_specs.html'
def get_render_template(self, context, instance, placeholder):
return self.render_template

cache = True
text_enabled = False
Expand Down

0 comments on commit ed72de7

Please sign in to comment.