Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Collapse repository management buttons into a drop-down menu
Browse files Browse the repository at this point in the history
Fixed arrow down alingment and dropdown label
  • Loading branch information
amir-qayyum-khan committed Aug 10, 2015
1 parent 72e9b41 commit ea2ac74
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
5 changes: 5 additions & 0 deletions ui/static/ui/css/mit-lore.css
Expand Up @@ -6,6 +6,7 @@

*::after, *::before {
content: '';
content: none; /* for chrome and safari */
}

body {
Expand Down Expand Up @@ -510,3 +511,7 @@ ul.repos {
padding: 0px;
margin: 0px;
}

.dropdown-repository {
margin-left: 380px;
}
2 changes: 1 addition & 1 deletion ui/templates/base.html
Expand Up @@ -75,7 +75,7 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle nav-highlight" data-toggle="dropdown" role="button" aria-expanded="false">{{ request.user.username }}<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url "cas_logout" %}?next_page=/">Logout</a></li>
<li><a href="{% url "cas_logout" %}?next_page=/"><i class="fa fa-sign-out"></i> Logout</a></li>
{% block actions %}{% endblock %}
<!-- <li><a href="#">Action</a></li> -->
<!-- <li><a href="#">Another action</a></li> -->
Expand Down
41 changes: 25 additions & 16 deletions ui/templates/repo_base.html
@@ -1,23 +1,32 @@
{% extends "base.html" %}
{% block nav %}
{{ nav.super }}
{% if 'import_course' in perms_on_cur_repo %}
<li>
<a href="{% url 'upload' repo.slug %}"><i class="fa fa-arrow-circle-o-right"></i> Import Course</a>
</li>
{% endif %}
{% if 'manage_taxonomy' in perms_on_cur_repo %}
<li>
<a href="#0" class="btn-taxonomies"><i class="fa fa-cogs"></i> Manage Taxonomies</a>
</li>
{% endif %}
<div class="btn-group dropdown-repository">
<button type="button" class="btn btn-default">Repository Actions</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
{% if 'import_course' in perms_on_cur_repo %}
<li>
<a href="{% url 'upload' repo.slug %}"><i class="fa fa-arrow-circle-o-right"></i> Import Course</a>
</li>
{% endif %}
{% if 'manage_taxonomy' in perms_on_cur_repo %}
<li>
<a href="#0" class="btn-taxonomies"><i class="fa fa-cogs"></i> Manage Taxonomies</a>
</li>
{% endif %}
{% if 'manage_repo_users' in perms_on_cur_repo %}
<li>
<a href="#repo-members" class="btn-members"><i class="fa fa-users"></i> Manage Members</a>
</li>
{% endif %}
</ul>
<input type="hidden" id="repo_slug" value="{{ repo.slug }}" />
{% if 'manage_repo_users' in perms_on_cur_repo %}
<li>
<a href="#repo-members" class="btn-members"><i class="fa fa-users"></i> Manage Members</a>
</li>
{% endif %}
{% endblock %}
<div>
{% endblock %}

{% block extranavbarright %}
<span class="text-repo-name">Repository: <a href="{% url 'repositories' repo.slug %}">{{ repo.name }}</a></span>
Expand Down

0 comments on commit ea2ac74

Please sign in to comment.