blob: 0543a414293549eeee196c1d1154a840fb158200 (
plain) (
blame)
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
|
<h1>{{lang_mainHeading}}</h1>
<p>{{lang_introText}}</p>
<h2>{{newsTypeName}}</h2>
<form action="?do=news" method="post">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="type" value="{{type}}">
<input type="hidden" name="action" value="save">
{{#withTitle}}
<div class="form-group">
<label for="news-title-id">{{lang_title}}</label>
<input type="text" name="news-title" id ="news-title-id" class="form-control" placeholder="{{lang_titlePh}}" value="{{currentTitle}}" {{save.readonly}}>
</div>
{{/withTitle}}
<div class="form-group">
<label for="validity">{{lang_validityHours}}</label> ({{lang_leaveEmptyInfinite}})
<input id="validity" type="text" name="validity" value="{{validity}}" class="form-control">
</div>
<div class="form-group">
<label for="news-content-id">{{lang_content}}</label>
<textarea required name="news-content" id ="news-content-id" class="form-control summernote" rows="5" cols="30" {{save.readonly}}>{{currentContent}}</textarea>
</div>
<div>
{{lang_lastUpdate}}: {{dateline_s}}
<br>
{{lang_expires}}: {{expires_s}}
</div>
<div class="text-right">
<button {{save.disabled}} class="btn btn-primary sn-btn" type="submit">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
</button>
</div>
</form>
<br><br>
<div class="panel panel-default">
<div class="panel-heading">
{{lang_previousEntries}}
</div>
<div class="panel-body">
<div class="table-responsive">
<form method="post" action="?do=news">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="type" value="{{type}}">
<input type="hidden" name="action" value="delete">
<table class="table table-condensed stupidtable">
<thead>
<tr>
<th class="text-nowrap slx-smallcol" data-sort="int">{{lang_created}}</th>
<th class="text-nowrap slx-smallcol" data-sort="int">{{lang_expires}}</th>
<th class="text-nowrap" data-sort="string">{{lang_title}}</th>
<th class="text-nowrap" data-sort="string" width="30%">{{lang_content}}</th>
<th class="text-nowrap slx-smallcol">{{lang_show}}</th>
<th class="text-nowrap slx-smallcol">{{lang_delete}}</th>
</tr>
</thead>
<tbody>
{{#list}}
<tr class="{{active}} {{muted}}">
<td class="text-left text-nowrap" data-sort-value={{dateline}}>{{dateline_s}}</td>
<td class="text-left text-nowrap" data-sort-value={{expires}}>{{expires_s}}</td>
<td><table class="slx-ellipsis"><tr><td>{{title}}</td></tr></table></td>
<td><table class="slx-ellipsis"><tr><td class="small">{{content}}</td></tr></table></td>
<td class="text-center">
<a class="btn btn-primary btn-xs" href="?do=news&newsid={{newsid}}&action=show">
<span class="glyphicon glyphicon-share-alt"></span>
</a>
</td>
<td class="text-center">
<button {{delete.disabled}} class="btn btn-danger btn-xs btn-delete" type="submit"
name="newsid" value="{{newsid}}" data-confirm="#confirm-delete" data-title="{{title}}">
<span class="glyphicon glyphicon-trash"></span>
</button>
</td>
</tr>
{{/list}}
</tbody>
</table>
</form>
</div>
</div>
</div>
<div class="hidden" id="confirm-delete">{{lang_confirmDelete}}</div>
<script type="application/javascript"><!--
document.addEventListener("DOMContentLoaded", function () {
$('.sn-btn').click(function (event) {
var $button = $('.note-btn.btn-codeview');
if ($button.hasClass('active')) {
$button.click();
}
});
{{#hasSummernote}}
$('.summernote[readonly]').each(function() { $(this).summernote('disable'); });
{{/hasSummernote}}
}, false);
// --></script>
|