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










                                                                                                                                
                         
 



                                                                       
                            
 



                                                            
                                                                      





                                                                                                                                                                        























                                                                                                                                                                                    








                                                                                                                                                                               
              















                                                                                       
                                                                                    




                                                                                  
                                                                 









                                                                                                                                    

                                                                                                                                         



















                                                                                                                                                                       

                      
      
 
                                                                    







                                                           
                          
                                                                                       
                          









                                                                                                 

              
<h1>{{lang_mainHeading}}</h1>

<p>{{lang_introText}}</p>

{{#overridden.0}}
	<div class="pull-right">
		<h3>{{lang_overridenLocations}}</h3>
		<ul>
			{{#overridden}}
				<li><a href="?do=news&amp;type={{type}}&amp;locationid={{locationid}}">{{locationname}}</a></li>
			{{/overridden}}
		</ul>
	</div>
{{/overridden.0}}

<h2>{{newsTypeName}}</h2>

{{#locationid}}
	<h3>{{location_name}}</h3>
	<div class="alert alert-info">{{lang_editingForLocation}}</div>
{{/locationid}}
<div class="clearfix"></div>

<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">
	<input type="hidden" name="locationid" value="{{locationid}}">
	{{#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 row">
		<div class="col-md-12">
			<label for="enddate">{{lang_expiryDate}}</label>
			<div class="checkbox">
				<input id="infinite-checkbox" type="checkbox" name="infinite" {{infinite_checked}}>
				<label for="infinite-checkbox">{{lang_infiniteDuration}}</label>
			</div>
		</div>
		<div class="col-md-3 col-sm-6">
			<div class="input-group">
				<span class="input-group-addon">
					<span class="glyphicon glyphicon-calendar"></span>
				</span>
				<input id="enddate" type="text" name="enddate" value="{{enddate}}" class="form-control datepicker" {{save.readonly}}>
			</div>
		</div>
		<div class="col-md-3 col-sm-6">
			<div class="input-group bootstrap-timepicker timepicker">
				<span class="input-group-addon">
					<span class="glyphicon glyphicon-time"></span>
				</span>
				<input id="endtime" type="time" name="endtime" value="{{endtime}}" class="form-control timepicker2" {{save.readonly}} pattern="[0-9]{1,2}:[0-9]{2}">
			</div>
		</div>
	</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></th>
							<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="{{live}} {{muted}}">
							<td>{{#active}}<span class="glyphicon glyphicon-eye-open"></span>{{/active}}</td>
							<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}}
	var dateSettings = {
		format: 'yyyy-mm-dd',
		todayHighlight: true,
	};
	$('.datepicker').datepicker(dateSettings);
	var chf = function() {
		$('#enddate, #endtime').prop('disabled', $('#infinite-checkbox').is(':checked'));
	};
	$('#infinite-checkbox').change(chf);
	chf();
}, false);
// --></script>