Commit 519a1dd43aa96ad79fb3bdbe9bdee9dbc5a6337c

Authored by Felipe Henrique de Almeida Bormann
1 parent 99731dcc

added options if the user is a professor of the subject or the coordinator of the whole category

Showing 1 changed file with 15 additions and 1 deletions   Show diff stats
subjects/templates/subjects/subject_card.html
... ... @@ -8,7 +8,21 @@
8 8 <button class="btn btn-default btn-xs text-center cat-selector"><i class="fa fa-angle-right fa-2x" aria-hidden="true"></i></button> {{subject.name}}
9 9 </a>
10 10 </h4>
11   -
  11 +
  12 + {% if request.user in subject.professor.all or request.user in category.coordinators.all %}
  13 + <div class="divMoreActions" >
  14 + <div class="btn-group">
  15 + <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="moreActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  16 + <i class="fa fa-ellipsis-v fa-2x" aria-hidden="true"></i>
  17 + </button>
  18 + <ul class="dropdown-menu pull-right" aria-labelledby="moreActions">
  19 + <li><a href="#"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li>
  20 + <li><a href="#"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li>
  21 + <li><a href="#"><i class="fa fa-trash fa-fw" aria-hidden="true"></i>&nbsp;{% trans 'Remove' %}</a></li>
  22 + </ul>
  23 + </div>
  24 + </div>
  25 + {% endif %}
12 26 <div class="col-md-5 pull-right category-card-items">
13 27 <a href="" ><i class="fa fa-list" aria-hidden="true"></i></a>
14 28 <a href=""><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
... ...