#372 Only show the widget config button in edit mode
Merged 6 years ago by abompard. Opened 6 years ago by abompard.
abompard/fedora-hubs no-widget-config-in-view-mode  into  develop

@@ -7,7 +7,7 @@ 

      <a href="{{ url_for('%s_root' % widget.name, hub=widget_instance.hub.name, idx=widget_instance.idx) }}">

          <span><i class="fa fa-external-link" aria-hidden="true"></i></span>

      </a>

-     {% if widget_instance.hub.allows(g.user, "config") %}

+     {% if edit_mode and widget_instance.hub.allows(g.user, "config") %}

      <a data-target="#edit_modal" data-toggle="modal" type="button"

          class="edit_widget" data-url="{{ widget_instance.edit_url }}">

        <span><i class="fa fa-cog" aria-hidden="true"></i></span>

The widget config button redirects to the edit mode on POST anyway, it should only be accessible from the edit mode.

rebased

6 years ago

Pull-Request has been merged by abompard

6 years ago
Metadata