|
1 | 1 | {% extends "nav.html" %}
|
2 | 2 | {% block title %}
|
3 |
| -Conditionals |
| 3 | + Conditionals |
4 | 4 | {% endblock %}
|
5 | 5 | {% block extraFooter %}
|
6 |
| -<script src="../static/js/conditional.js"></script> |
| 6 | + <script src="../static/js/conditional.js"></script> |
7 | 7 | {% endblock %}
|
8 | 8 | {% block body %}
|
9 |
| -<div class="container main"> |
10 |
| - <div class="panel panel-default"> |
11 |
| - <div class="panel-heading"> |
12 |
| - <h3 class="panel-title">Conditionals</h3> |
13 |
| - </div> |
14 |
| - <div class="panel-body table-fill"> |
15 |
| - <div class="table-responsive"> |
16 |
| - {% if conditionals_len == 0 %} |
17 |
| - <div class="alert alert-info" style="margin:15px;">No conditionals.</div> |
18 |
| - {% else %} |
19 |
| - <table class="table table-striped no-bottom-margin"> |
20 |
| - <tbody id="conditionals"> |
21 |
| - <tr> |
22 |
| - <th>Name</th> |
23 |
| - <th>Date Created</th> |
24 |
| - <th>Date Due</th> |
25 |
| - <th>Description</th> |
26 |
| - {% if is_eval_director %} |
27 |
| - <th>Controls</th> |
28 |
| - {% endif %} |
29 |
| - </tr> |
30 |
| - <!-- ng-repeat="conditional in conditionals.data"--> |
31 |
| - {% for c in conditionals %} |
32 |
| - <tr id="conditional-{{c['id']}}" conditional_id="{{c['id']}}"> |
33 |
| - <td>{{c['name']}}</td> <!-- If showing all users --> |
34 |
| - <td>{{c['date_created']}}</td> |
35 |
| - <td>{{c['date_due']}}</td> |
36 |
| - <td>{{c['description']}}</td> |
37 |
| - {% if is_eval_director %} |
38 |
| - <th> |
39 |
| - <button role="button" class="btn btn-raised btn-primary btn-success" style="width:100%;" id="pass-{{c['id']}}"> |
40 |
| - Pass |
41 |
| - </button> |
42 |
| - <button role="button" class="btn btn-raised btn-primary btn-danger" style="width:100%;" id="fail-{{c['id']}}"> |
43 |
| - Fail |
44 |
| - </button> |
| 9 | + <div class="container main"> |
| 10 | + <div class="panel panel-default"> |
| 11 | + <div class="panel-heading"> |
| 12 | + <h3 class="panel-title"> |
| 13 | + Conditionals |
| 14 | + {% if is_eval_director %} |
| 15 | + <button type="button" class="btn btn-primary btn-sm btn-conditional" data-toggle="modal" data-target="#createConditional"> |
| 16 | + <span class="glyphicon glyphicon-plus"></span> Add |
| 17 | + </button> |
| 18 | + {% endif %} |
| 19 | + </h3> |
| 20 | + </div> |
| 21 | + <div class="panel-body table-fill"> |
| 22 | + <div class="table-responsive"> |
| 23 | + {% if conditionals_len == 0 %} |
| 24 | + <div class="alert alert-info" style="margin:15px;">No conditionals.</div> |
| 25 | + {% else %} |
| 26 | + <table class="table table-striped no-bottom-margin"> |
| 27 | + <tbody id="conditionals"> |
| 28 | + <tr> |
| 29 | + <th>Name</th> |
| 30 | + <th>Date Created</th> |
| 31 | + <th>Date Due</th> |
| 32 | + <th>Description</th> |
| 33 | + {% if is_eval_director %} |
| 34 | + <th>Controls</th> |
| 35 | + {% endif %} |
| 36 | + </tr> |
| 37 | + <!-- ng-repeat="conditional in conditionals.data"--> |
| 38 | + {% for c in conditionals %} |
| 39 | + <tr id="conditional-{{ c['id'] }}" conditional_id="{{ c['id'] }}"> |
| 40 | + <td>{{ c['name'] }}</td> <!-- If showing all users --> |
| 41 | + <td>{{ c['date_created'] }}</td> |
| 42 | + <td>{{ c['date_due'] }}</td> |
| 43 | + <td>{{ c['description'] }}</td> |
| 44 | + {% if is_eval_director %} |
| 45 | + <th> |
| 46 | + <button role="button" class="btn btn-raised btn-primary btn-success" |
| 47 | + style="width:100%;" id="pass-{{ c['id'] }}"> |
| 48 | + Pass |
| 49 | + </button> |
| 50 | + <button role="button" class="btn btn-raised btn-primary btn-danger" |
| 51 | + style="width:100%;" id="fail-{{ c['id'] }}"> |
| 52 | + Fail |
| 53 | + </button> |
45 | 54 |
|
46 |
| - </th> |
47 |
| - {% endif %} |
48 |
| - </tr> |
49 |
| - {% endfor %} |
50 |
| - </tbody> |
51 |
| - </table> |
52 |
| - {% endif %} |
| 55 | + </th> |
| 56 | + {% endif %} |
| 57 | + </tr> |
| 58 | + {% endfor %} |
| 59 | + </tbody> |
| 60 | + </table> |
| 61 | + {% endif %} |
| 62 | + </div> |
53 | 63 | </div>
|
54 | 64 | </div>
|
55 | 65 | </div>
|
56 |
| - <div > |
| 66 | + <div class="modal fade" id="createConditional" tabindex="-1"> |
| 67 | + <div class="vertical-alignment-helper"> |
| 68 | + <div class="modal-dialog vertical-align-center"> |
| 69 | + <div class="modal-content"> |
| 70 | + <div class="modal-header"> |
| 71 | + <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> |
| 72 | + <h4 class="modal-title" id="editUserTitle">Conditional</h4> |
| 73 | + </div> |
| 74 | + <div class="modal-body"> |
| 75 | + <div class="row user-edit-row"> |
| 76 | + <label class="control-label" for="memberName">Member Name</label> |
| 77 | + <input type="text" name="attendees" class="form-control" data-module="memberSelect" data-src="cm_members"/> |
| 78 | + </div> |
| 79 | + |
| 80 | + <div class="row user-edit-row"> |
| 81 | + <label class="control-label" for="memberName">Due Date</label> |
| 82 | + <input type="text" name="date" class="form-control" value="{{ date }}" data-module="datepicker" /> |
| 83 | + </div> |
| 84 | + <div class="row user-edit-row"> |
| 85 | + <label class="control-label" for="memberName">Requirement</label> |
| 86 | + <input class="form-control" id="memberName" name="name" type="text"> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + <div class="modal-footer"> |
| 90 | + <button type="button" class="btn btn-success save-btn pull-left">Pass</button> |
| 91 | + <button type="button" class="btn btn-danger save-btn pull-left">Fail</button> |
| 92 | + <button type="button" class="btn btn-primary save-btn">Save</button> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
57 | 96 | </div>
|
58 |
| - {% endblock %} |
| 97 | +</div> |
| 98 | +{% endblock %} |
0 commit comments