Commit 4bf6bfcb3bd1649968aeb3dd45f171288def9cb6

Authored by Felipe Henrique de Almeida Bormann
1 parent 17f52102

fixed accordeon and added subscribe and access buttons, still has to add it's functionality

subjects/templates/subjects/list.html
... ... @@ -92,7 +92,7 @@
92 92 {% if user in category.coordinators.all %}
93 93 <a href="{% url 'subjects:create' category.slug %}"><button class="create-subject-btn"> {% trans "create new subject" %} </button></a>
94 94 {% endif %}
95   - <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true">
  95 + <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true">
96 96 {% for subject in category.subjects %}
97 97 {% include "subjects/subject_card.html" %}
98 98 {% endfor %}
... ... @@ -100,6 +100,8 @@
100 100  
101 101  
102 102 </div>
  103 +
  104 +
103 105  
104 106  
105 107 {% comment %}
... ...
subjects/templates/subjects/subject_card.html
... ... @@ -49,8 +49,12 @@
49 49 <p>{{subject.description_brief|safe}}</p>
50 50  
51 51  
52   -
53   -
  52 + {% if request.user in subject.students.all %}
  53 + <a href="{% url 'categories:create' %}"><button class="access-subject"> {% trans "Access Subject" %}</button></a>
  54 + {% else %}
  55 + <a href="{% url 'categories:create' %}"><button class="subscribe-subject"> {% trans "Subscribe to Subject" %}</button></a>
  56 + {% endif %}
  57 +
54 58 </div>
55 59  
56 60 </div>
57 61 \ No newline at end of file
... ...