summaryrefslogblamecommitdiffstats
path: root/modules-available/locationinfo/templates/page-locations.html
blob: f90a0f3554b4adaf26fb78eab3ca89d3434733b5 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                
 



                                                 

                                              
                                         
                                                    
                                                                               
             
                
 
               



                                                                                          
                                            
                                                                                                                           
                                            
                                                        
                                            

                                                                                      
                                            
                             
                                                                                      
                                           
                             
                                                



                                                              
                                                
                                                                                          

                             
                 
                












                                                                                                         
                                                                                                          



                                                                                                     








                                                                                     








                                                                                                                                                                                     































                                                                                                                                        
              
<h2>{{lang_locationsTable}}</h2>

<p>{{lang_locationsTableHints}}</p>

<table class="table table-condensed table-hover">
	<thead>
	<tr>
		<th>{{lang_locationName}}</th>
		<th>{{lang_backend}}</th>
		<th>{{lang_lastCalendarUpdate}}</th>
		<th class="text-center slx-smallcol">{{lang_openingtimes}}</th>
	</tr>
	</thead>

	<tbody>
	{{#list}}
		<tr>
			<td>
				<div style="display:inline-block;width:{{depth}}em"></div>
				{{#allowed}}
				<a href="#" class="loc-name {{^depth}}slx-bold{{/depth}}" data-locationid="{{locationid}}">
				{{/allowed}}
					{{locationname}}
				{{#allowed}}
					<span class="glyphicon glyphicon-edit"></span>
				</a>
				{{/allowed}}
			</td>
			<td {{#backendMissing}}class="text-danger"{{/backendMissing}}>
				{{backend}}
			</td>
			<td class="text-center">
				{{#backend}}
					{{lastCalendarUpdate}}
				{{/backend}}
			</td>
			<td class="text-center">
				<span class="glyphicon glyphicon-{{openingGlyph}}"></span>
			</td>
		</tr>
	{{/list}}
	</tbody>
</table>

<div class="modal fade" id="location-modal" tabindex="-1" role="dialog">
	<div class="modal-dialog"> <!--style="min-width:600px;width:70%"-->

		<div class="modal-content">
			<form method="post" action="?do=locationinfo" id="settings-form">
				<input type="hidden" name="token" value="{{token}}">
				<input type="hidden" name="action" value="writeLocationConfig">
				<input type="hidden" name="openingtimes" id="json-openingtimes" value="">
				<div class="modal-header"><h2 id="location-modal-header"></h2></div>
				<div class="modal-body"></div>
				<div class="modal-footer">
					<a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
					<button type="submit" class="btn btn-primary">
						<span class="glyphicon glyphicon-floppy-disk"></span>
						{{lang_save}}
					</button>
				</div>
			</form>
		</div>

	</div>
</div>

<div class="hidden" id="expert-template">
	<div class="row expert-row" style="margin-top:1em;border-top:1px solid #ddd">
		<div class="col-xs-12 days-box">
			<div class="pull-right checkbox checkbox-inline"><input type="checkbox" class="i-delete"><label><span class="glyphicon glyphicon-trash"></span></label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Monday"><label>{{lang_shortMonday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Tuesday"><label>{{lang_shortTuesday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Wednesday"><label>{{lang_shortWednesday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Thursday"><label>{{lang_shortThursday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Friday"><label>{{lang_shortFriday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Saturday"><label>{{lang_shortSaturday}}</label></div>
			<div class="checkbox checkbox-inline"><input type="checkbox" class="i-Sunday"><label>{{lang_shortSunday}}</label></div>
		</div>
		<div class="col-sm-6">
			<div class="input-group bootstrap-timepicker">
				<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
				<input type="text" class="form-control timepicker2 i-openingtime" pattern="[0-9]{1,2}:[0-9]{2}">
			</div>
		</div>
		<div class="col-sm-6">
			<div class="input-group bootstrap-timepicker">
				<span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
				<input type="text" class="form-control timepicker2 i-closingtime" pattern="[0-9]{1,2}:[0-9]{2}">
			</div>
		</div>
	</div>
</div>

<script type="text/javascript"><!--

document.addEventListener("DOMContentLoaded", function () {
	/**
	 * Load a opening time modal of a location.
	 */
	$('.loc-name').click(function (e) {
		e.preventDefault();
		var locationId = $(this).data('locationid');
		var locationName = $(this).text();
		$('#location-modal-header').text("[" + locationId + "] " + locationName);
		$('#location-modal').modal('show').find('.modal-body').load("?do=locationinfo&action=config-location&id=" + locationId);
	});
	$('#settings-form').submit(submitLocationSettings);
});

//--></script>