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