-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathhist.pug
95 lines (85 loc) · 3.91 KB
/
hist.pug
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
.objHist(data-bind="with: repository[M!M]")
// ko if: haveDiff()
.diffSwitch(data-bind="text: showDiff() ? 'Скрыть подсветку разницы значений' : 'Показать разницу значений', click: switchDiff")
// /ko
ul.media-list.hists
//ko if: haveDiff() && switchDiff2()
.diffSwitch(data-bind="text: showDiff() ? 'Скрыть подсветку разницы значений' : 'Показать разницу значений', click: switchDiff")
// /ko
| <script id="dotRegions" type="text/x-dot-template">
| {{~it :region:index}}
| {{?index}}, {{?}}
.region: a(target="_blank", href="{{='/ps?f=r!'+region.cid}}") {{=region.title_local}}
| {{~}}
| </script>
| <script id="dotRegionsDiff" type="text/x-dot-template">
span.regions
| {{?it.base}}{{=it.base}},{{?}}
| {{?it.del}} 
span.diffDel {{=it.del}}
| {{?}}
| {{?it.add}} 
span.diffIns {{=it.add}}
| {{?}}
| </script>
| <script id="dothist" type="text/x-dot-template">
| {{~it.hists :h:index}}
li.media(id="h{{=h.stamp}}", class="hist{{?h.isnew}} isnew{{?}}{{?h.hl}} hl{{?}}")
a.pull-left(target="_blank", href="{{='/u/'+h.user.login}}")
img.media-object(src="{{=h.user.avatar}}")
.media-body
.histHead
a.author(target="_blank", href="{{='/u/'+h.user.login}}") {{=h.user.disp}}
='{{?h.role}} '
.role
| {{?h.role===5}}как модератор
| {{?h.roleregion}} региона
a(target="_blank", href="{{='/ps?f=r!' + h.roleregion.cid}}") {{=h.roleregion.title_local}}{{?}}
| {{??h.role>9}}как администратор{{?}}
| {{?}}
.dotDelimeter ·
a.histStamp(data-replace="true", href="/p/{{=it.cid}}?history={{=h.stamp}}") {{=it.fDate(new Date(h.stamp))}}
| {{?h.values.s}}
.info.iconed(style="color: {{=h.values.s.color}};")
span.glyphicon(class="{{=h.values.s.icon_history||h.values.s.icon}}")
| {{=h.values.s.action}}
| {{?}}
| {{?h.del}}
.info.red.iconed
span.glyphicon.glyphicon-minus
| Удален{{?h.del.length>1}}ы{{??}}о{{?}}:
| {{~h.del :del:delIndex}}
| {{?delIndex}},{{?}} 
span.del {{=it.fields[del]}}
| {{~}}
| {{?}}
| {{?h.values.nocomments !== undefined}}
.info.iconed(class="{{?h.values.nocomments}}red{{??}}green{{?}}")
span.glyphicon(class="glyphicon-{{?h.values.nocomments}}ban-circle{{??}}ok{{?}}")
| Комментирование {{?h.values.nocomments}}запрещено{{??}}разрешено{{?}}
| {{?}}
| {{?h.values.histmissing}}
.info.iconed.red
span.glyphicon(class="glyphicon-floppy-remove")
| Доступна не вся история изменений
| {{?}}
| {{?h.reason}}
.value
.name Причина
.val
| {{?h.reason.cid}}{{=it.reasonsHash[h.reason.cid].title}}{{?}}
| {{?h.reason.desc}}
.reasonDesc {{=h.reason.desc}}
| {{?}}
| {{?}}
| {{~h.textValuesArr :value}}
.value(class="{{?index}}iconed{{?}}")
.name(class="{{?value.add}}green{{??index}}orange{{?}}")
| {{?index}}
span.glyphicon(class="glyphicon-{{?value.add}}plus{{??}}pencil{{?}}")
| {{?}}
| {{=it.fields[value.field]}}
.val {{=value.val}}
| {{~}}
| {{~}}
| </script>