Skip to content

Commit

Permalink
Change Customer menu item to Resources which is a drop down menu Open…
Browse files Browse the repository at this point in the history
  • Loading branch information
PengfeiLi0218 committed Jan 31, 2019
1 parent 179bb51 commit ed457e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion apimanager/base/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
</ul>
</li>
{% url "customers-create" as customers_create_url %}
<li{% if customers_create_url in request.path %} class="active"{% endif %}><a href="{{ customers_create_url }}">Customers</a></li>
<li class="dropdown{% if customers_create_url in request.path %} active{% endif %}">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Resources</a>
<ul class="dropdown-menu">
<li{% if customers_create_url in request.path %} class="active"{% endif %}><a href="{{ customers_create_url }}">Customers</a></li>
</ul>
</li>
{% url "config-index" as config_index_url %}
<li{% ifequal request.path config_index_url %} class="active" {% endifequal %}><a href="{{ config_index_url }}">Config</a></li>
{% if API_TESTER_URL %}
Expand Down
8 changes: 4 additions & 4 deletions apimanager/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def get_users_rolenames(self, context):
except APIError as err:
messages.error(self.request, err)
return [], []
except:
messages.error(self.request, "Unknown Error")
except Exception as inst:
messages.error(self.request, "Unknown Error {}".format(type(inst).__name__))
return [], []

role_names = []
Expand All @@ -69,8 +69,8 @@ def get_users_rolenames(self, context):
except KeyError as err:
messages.error(self.request, 'KeyError: {}'.format(err))
return [], []
except:
messages.error(self.request, "Unknown Error")
except Exception as inst:
messages.error(self.request, "Unknown Error {}".format(type(inst).__name__))
return [], []

role_names = list(set(role_names))
Expand Down

0 comments on commit ed457e1

Please sign in to comment.