summaryrefslogtreecommitdiffstats
path: root/modules-available/news/templates/page-news.html
blob: 37e3471d0dabc65bcbf4f7d62a599b4b288316c3 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

<h1>{{lang_vmChooser_title}}</h1>
<ul class="nav nav-tabs" role="tablist">
	<li role="presentation" class="{{^editHelp}}active{{/editHelp}}"><a href="#news" role="tab" data-toggle="tab">{{lang_editNews}}</a></li>
	<li role="presentation" class="{{#editHelp}}active{{/editHelp}}"	  ><a href="#help" role="tab" data-toggle="tab">{{lang_editHelp}}</a></li>
</ul>

<div class="tab-content">
	<div role="tabpanel" class="tab-pane {{^editHelp}}active{{/editHelp}}" id="news" style="padding:5px">
		<form action="?do=News&amp;action=save" method="post">
			<p>{{lang_newsIntro}}</p>
			<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="{{welcome}}" value="{{latestTitle}}">
			</div>
			<div class="form-group">
				<label for="news-content-id">{{lang_content}}</label>
				<textarea name="news-content" id ="news-content-id" class="form-control summernote" rows="5" cols="30"  placeholder="">{{latestContent}}</textarea>
			</div>
			<div class="row">
				<div class="text-left col-md-6">
					<p>{{lang_latestUpdate}}: {{latestDate}}</p>
				</div>
				<div class="text-right col-md-6">
					<button class="btn btn-primary sn-btn" name="news-type" value="news" type="submit"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
					<input type="hidden" name="token" value="{{token}}">
				</div>
			</div>

		</form>
		<br/>
		<div class="panel panel-default">
			<div class="panel-heading">
				{{lang_newsOld}}
			</div>
			<div class="panel-body">
				<div class="table-responsive">
					<form method="post" action="?do=News&amp;action=delete">
						<table class="table table-stripped table-condensed stupidtable">
							<thead>
								<tr>
									<th data-sort="int">{{lang_date}}</th>
									<th data-sort="string">{{lang_title}}</th>
									<th data-sort="string">{{lang_content}}</th>
									<th></th>
								</tr>
							</thead>
							<tbody>
								{{#list}}
								<tr {{#active}}class="active"{{/active}}>
									<td class="text-left text-nowrap" data-sort-value={{dateline}}>{{date}}</td>
									<td><table class="slx-ellipsis"><tr><td>{{title}}</td></tr></table></td>
									<td><table class="slx-ellipsis"><tr><td>{{content}}</td></tr></table></td>
									<td class="text-nowrap">
										<a class="btn btn-primary btn-xs" href="?do=news&amp;newsid={{newsid}}&amp;action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a>
										<button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button>
									</td>
								</tr>
								{{/list}}
							</tbody>
						</table>
						<input type="hidden" name="token" value="{{token}}">
					</form>
				</div>
			</div>
		</div>
	</div>
	<div role="tabpanel" class="tab-pane {{#editHelp}}active{{/editHelp}}" id="help">
		<form action="?do=News&amp;action=save" method="post">
			<div class="form-group">
				<br/>
				<label for="news-content-id">{{lang_content}}</label>
				<textarea name="help-content" id="help-content-id" class="form-control summernote" style="min-height:400px"  placeholder="">{{latestHelp}}</textarea>
			</div>
			<div class="text-right">
				<button class="btn btn-primary sn-btn" name="news-type" value="help" type="submit"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
				<input type="hidden" name="token" value="{{token}}">
			</div>
		</form>
		<br/>
		<div class="panel panel-default">
			<div class="panel-heading">
				{{lang_oldHelp}}
			</div>
			<div class="panel-body">
				<div class="table-responsive">
					<form method="post" action="?do=News&amp;action=delete&editHelp=true">
						<table class="table table-stripped table-condensed stupidtable">
							<thead>
								<tr>
									<th data-sort="int">{{lang_date}}</th>
									<th data-sort="string">{{lang_content}}</th>
									<th></th>
								</tr>
							</thead>
							<tbody>
								{{#listHelp}}
								<tr {{#active}}class="active"{{/active}}>
									<td class="text-left text-nowrap" data-sort-value={{dateline}}>{{date}}</td>
									<td><table class="slx-ellipsis"><tr><td>{{content}}</td></tr></table></td>
									<td class="text-nowrap">
										<a class="btn btn-primary btn-xs" href="?do=news&amp;newsid={{newsid}}&amp;action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a>
										<button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button>
									</td>
								</tr>
								{{/listHelp}}
							</tbody>
						</table>
						<input type="hidden" name="token" value="{{token}}">
					</form>
				</div>
			</div>
		</div>
	</div>
</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();
		}
	});
}, false);
// --></script>