-
Notifications
You must be signed in to change notification settings - Fork 105
/
dependencies.html
109 lines (109 loc) · 6.16 KB
/
dependencies.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<form id="dependency_form" class="form-horizontal">
<input type="hidden" name="issue_id" value="{{ @issue.id }}">
<div class="form-group">
<label class="col-md-5"><b>{{ @dict.task_depends }}</b></label>
<div class="col-md-3">
<input type="text" class="form-control input-sm" name="dependency_id" required>
</div>
<div class="col-md-2">
<select class="form-control input-sm" name="type">
<option>{{ @dict.fs }}</option>
<option>{{ @dict.ff }}</option>
<option>{{ @dict.ss }}</option>
<option>{{ @dict.sf }}</option>
</select>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-primary btn-sm">{{ @dict.add_dependency }}</button>
</div>
</div>
</form>
<check if="{{ !empty(@dependencies) }}">
<div class="table-responsive">
<table class="table table-striped table-condensed issue-list dependency-list">
<thead>
<tr>
<th data-sort="int">{{ @dict.cols.id }}</th>
<th data-sort="string">{{ @dict.cols.title }}</th>
<th data-sort="string">{{ @dict.cols.type}}</th>
<th data-sort="string">{{ @dict.cols.author }}</th>
<th data-sort="string">{{ @dict.cols.assignee }}</th>
<th data-sort="int">{{ @dict.cols.start }}</th>
<th data-sort="int">{{ @dict.cols.due }}</th>
<th data-sort="int">{{ @dict.cols.status }}</th>
<th data-sort="int"></th>
</tr>
</thead>
<tbody>
<repeat group="{{ @dependencies }}" value="{{ @item }}">
<tr data-id="{{ @item.d_id }}" class="{{ @item.status_closed ? 'closed' : '' }}">
<td><a href="{{ @BASE }}/issues/{{ @item.id }}">{{ @item.id }}</a></td>
<td><a href="{{ @BASE }}/issues/{{ @item.id }}">{{ @item.name | esc }}</a></td>
<td>{{ @item.dependency_type }}</td>
<td><a href="{{ @BASE }}/user/{{ @item.author_username }}">{{ @item.author_name | esc }}</a></td>
<td><a href="{{ @BASE }}/user/{{ @item.owner_username }}">{{ @item.owner_name | esc }}</a></td>
<td data-sort-value="{{ @item.start_date ? strtotime(@item.start_date) : 0 }}" title="{{ @item.start_date ? date('M j, Y \\a\\t g:ia', strtotime(@item.start_date)) : '' }}">{{ @item.start_date ? date("n/j/y", strtotime(@item.start_date)) : '' }}</td>
<td data-sort-value="{{ @item.due_date ? strtotime(@item.due_date) : 0 }}">{{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }}</td>
<td data-sort-value="{{ @item.status }}">{{ @item.status_name }}</td>
<td><a href="#" class="delete"><span class="fa fa-remove"></span></a></td>
</tr>
</repeat>
</tbody>
</table>
</div>
</check>
<hr>
<form id="dependent_form" class="form-horizontal">
<input type="hidden" name="dependency_id" value="{{ @issue.id }}">
<div class="form-group">
<label class="col-md-5"><strong>{{ @dict.task_dependency }}</strong></label>
<div class="col-md-3">
<input type="text" class="form-control input-sm" name="issue_id" required>
</div>
<div class="col-md-2">
<select class="form-control input-sm" name="type">
<option>{{ @dict.fs }}</option>
<option>{{ @dict.ff }}</option>
<option>{{ @dict.ss }}</option>
<option>{{ @dict.sf }}</option>
</select>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-primary btn-sm">{{ @dict.add_dependent }}</button>
</div>
</div>
</form>
<check if="{{ !empty(@dependents) }}">
<div class="table-responsive">
<table class="table table-striped table-condensed issue-list dependency-list">
<thead>
<tr>
<th data-sort="int">{{ @dict.cols.id }}</th>
<th data-sort="string">{{ @dict.cols.title }}</th>
<th data-sort="string">{{ @dict.cols.type}}</th>
<th data-sort="string">{{ @dict.cols.author }}</th>
<th data-sort="string">{{ @dict.cols.assignee }}</th>
<th data-sort="int">{{ @dict.cols.start }}</th>
<th data-sort="int">{{ @dict.cols.due }}</th>
<th data-sort="int">{{ @dict.cols.status }}</th>
<th data-sort="int"></th>
</tr>
</thead>
<tbody>
<repeat group="{{ @dependents }}" value="{{ @item }}">
<tr data-id="{{ @item.d_id }}" class="{{ @item.status_closed ? 'closed' : '' }}">
<td><a href="{{ @BASE }}/issues/{{ @item.id }}">{{ @item.id }}</a></td>
<td><a href="{{ @BASE }}/issues/{{ @item.id }}">{{ @item.name | esc }}</a></td>
<td>{{ @item.dependency_type }}</td>
<td><a href="{{ @BASE }}/user/{{ @item.author_username }}">{{ @item.author_name | esc }}</a></td>
<td><a href="{{ @BASE }}/user/{{ @item.owner_username }}">{{ @item.owner_name | esc }}</a></td>
<td data-sort-value="{{ @item.start_date ? strtotime(@item.start_date) : 0 }}" title="{{ @item.start_date ? date('M j, Y \\a\\t g:ia', strtotime(@item.start_date)) : '' }}">{{ @item.start_date ? date("n/j/y", strtotime(@item.start_date)) : '' }}</td>
<td data-sort-value="{{ @item.due_date ? strtotime(@item.due_date) : 0 }}">{{ !empty(@item.due_date) ? date("n/j", strtotime(@item.due_date)) : "" }}</td>
<td data-sort-value="{{ @item.status }}">{{ @item.status_name }}</td>
<td><a href="#" class="delete"><span class="fa fa-remove"></span></a></td>
</tr>
</repeat>
</tbody>
</table>
</div>
</check>