Commit c7c5eb2dc9e3fe22c22ce713709135784b689a0a

Authored by fbormann
1 parent 823a9038

modified course detail view, it stil miss the amount of semester to put inside t…

…he card as well as the professor
core/static/css/base/amadeus.css
... ... @@ -70,6 +70,10 @@ ul {
70 70  
71 71 /*CSS TIMELINE*/
72 72  
  73 +.panel-title{ /*Because we use an outer a tag*/
  74 + color: rgba(255,255,255,.84);
  75 +}
  76 +
73 77 .bubble {
74 78 width: 100%;
75 79 padding: .5em 1em;
... ... @@ -218,13 +222,8 @@ ul {
218 222 transition-timing-function: ease-in; }
219 223  
220 224  
221   -h3 {
222   - font-size: 1.2em;
223   - font-weight: bold;
224   - font-family: 'Lato';
225   - display: inline-block;
226   - margin-bottom: .2em;
227   - color: #95a5a6; }
  225 +
  226 +.icon-more-horiz {margin-top: 0px; margin-bottom: 0px; padding-left: 0px;}
228 227  
229 228 .retweet {
230 229 position: absolute;
... ...
courses/templates/course/view.html
... ... @@ -59,26 +59,71 @@
59 59 {% endblock %}
60 60  
61 61 {% block content %}
62   -<h3>{% trans "Subjects" %}</h3>
  62 +
  63 +<div class="panel panel-info">
  64 + <div class="panel-heading">
  65 + <div class="row">
  66 + <div class="col-xs-10 col-md-11">
  67 + <h3 class="panel-title">{{course.name}}</h3>
  68 + </div>
  69 + <div class="col-xs-2 col-md-1">
  70 + {% if user|has_role:'professor, system_admin' %}
  71 +
  72 + <div class="btn-group icon-more-horiz">
  73 + <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  74 + <i class="material-icons">more_horiz</i>
  75 + </button>
  76 + <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
  77 + <li><a href="javascript:void(0)"><i class="material-icons">create</i> Edit</a></li>
  78 + <li><a href="javascript:void(0)"><i class="material-icons">delete_sweep</i> Remove</a></li>
  79 + </ul>
  80 +
  81 + </div>
  82 + {% endif %}
  83 + </div>
  84 + </div>
  85 + </div>
  86 + <div class="panel-body">
  87 + <p><b>Course Name: </b>{{course.name}}</p>
  88 + <p><b>Duration (in semesters): </b></p>
  89 + {% for professor in course.professors.all %}
  90 + <p><b>Professor: </b>{{professor.name}}</p>
  91 + {% endfor %}
  92 +
  93 + <p>
  94 + <b>Description:</b>
  95 + <i>
  96 + {{course.description}}
  97 + </i>
  98 + </p>
  99 +
  100 + </div>
  101 +</div>
  102 +
  103 +
63 104 {% for subject in subjects %}
64 105 <div class="panel panel-info">
65 106 <div class="panel-heading">
66 107 <div class="row">
67 108 <a href="{% url 'course:view_subject' subject.slug %}">
68   - <div class="col-md-10">
  109 + <div class="col-md-11">
69 110  
70 111 <h3 class="panel-title">{{subject}}</h3>
71 112  
72 113 </div>
73 114 </a>
74   - <div class="col-md-2 text-right">
  115 + <div class="col-md-1 text-right">
75 116 {% if user|has_role:'professor, system_admin' %}
76   - <a href="{% url 'course:update_subject' subject.slug %}" style="padding: 3px; margin: 3px;" class="btn btn-sm btn-default">
77   - <span class="glyphicon glyphicon-edit"></span>
78   - </a>
79   - <a href="{% url 'course:delete_subject' subject.slug %}" style="padding: 3px; margin: 3px;" class="btn btn-sm btn-danger">
80   - <span class="glyphicon glyphicon-trash"></span>
81   - </a>
  117 + <div class="btn-group icon-more-horiz">
  118 + <button class="btn btn-default btn-xs dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  119 + <i class="material-icons">more_horiz</i>
  120 + </button>
  121 + <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
  122 + <li><a href="{% url 'course:update_subject' subject.slug %}"><i class="material-icons">create</i> {% trans "Edit" %}</a></li>
  123 + <li><a href="{% url 'course:delete_subject' subject.slug %}"><i class="material-icons">delete_sweep</i> {% trans "Remove" %}</a></li>
  124 + </ul>
  125 +
  126 + </div>
82 127 {% endif %}
83 128 </div>
84 129 </div>
... ...