summaryrefslogblamecommitdiffstats
path: root/modules-available/news/templates/page-news.html
blob: 0543a414293549eeee196c1d1154a840fb158200 (plain) (tree)
1
2
3
4
5
6
                             
 
                         
 
                         
 





















                                                                                                                                                                               
              















                                                                                       
                                                                                    



































                                                                                                                                                                       

                      
      
 
                                                                    







                                                           
                          
                                                                                       
                          

              
<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&amp;newsid={{newsid}}&amp;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>