Files
PetitTetonMeteor/imports/ui/Venues.html

77 lines
3.5 KiB
HTML

<template name="Venues">
<div id="venues">
{{#if Template.subscriptionsReady}}
<div class="tableControls">
<span class="controlLabel">Show Hidden</span>
<div class="toggleShowHidden checkbox checkbox-slider--b-flat">
<label>
<input type="checkbox" name="showHidden"><span></span>
</label>
</div>
<span class="pagination">
<span class="prevVenues noselect {{#if disablePrev}}disabled{{/if}}"><i class="fa fa-long-arrow-left" aria-hidden="true"></i> Prev</span>
<span class="nextVenues noselect {{#if disableNext}}disabled{{/if}}">Next <i class="fa fa-long-arrow-right" aria-hidden="true"></i></span>
</span>
</div>
<div class="listRow">
<div class="listCell">
<div class="tableContainer">
<table class="table table-striped table-hover">
<thead>
<tr>
<th class="name">Name {{>VenueSearch columnName='name'}}</th>
<th class="type">Type {{>VenueSearch columnName='type'}}</th>
<th class="actions">Actions <span class="newVenueButton btn btn-success"><i class="fa fa-plus-circle" aria-hidden="true"></i><i class="fa fa-times-circle" aria-hidden="true"></i></span></th>
</tr>
<!--<button type="button" name="newVenueButton"><i class="fa fa-plus-circle" aria-hidden="true"></i></button>-->
</thead>
<tbody>
{{#if displayNewVenue}}
{{> VenueEditor isNew=true}}
{{/if}}
{{#each venues}}
{{> Venue}}
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
{{else}}
{{/if}}
</div>
</template>
<template name="Venue">
<tr class="{{getRowClass}}">
{{#if editing}}
{{> VenueEditor}}
{{else}}
<td class="noselect nonclickable left">{{name}}</td>
<td class="noselect nonclickable left">{{type}}</td>
{{#if hidden}}
<td class="center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionShow fa fa-eye fa-lg noselect clickable" title="Show" aria-hidden="true"></i></td>
{{else}}
{{#if deactivated}}
<td class="center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionActivate fa fa-toggle-on fa-lg noselect clickable" title="Activate" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionHide fa fa-eye-slash fa-lg noselect clickable" title="Hide" aria-hidden="true"></i></td>
{{else}}
<td class="center"><i class="actionEdit fa fa-pencil-square-o fa-lg noselect clickable" title="Edit" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="actionRemove fa fa-times-circle fa-lg noselect clickable" title="Deactivate" aria-hidden="true"></i></td>
{{/if}}
{{/if}}
{{/if}}
</tr>
</template>
<template name="VenueEditor">
<td colspan="2" class="venueEditorTd">
<div class="editorDiv"><label>Name:</label><input name="name" class="form-control" type="text" value="{{name}}" autocomplete="off" required></div>
<div class="editorDiv"><label>Type:</label><input name="type" class="form-control" type="text" value="{{name}}" autocomplete="off" required></div>
</td>
<td class="center venueEditorTd"><i class="editorApply fa fa-check-square-o fa-lg noselect clickable" aria-hidden="true"></i>&nbsp;/&nbsp;<i class="editorCancel fa fa-times-circle fa-lg noselect clickable" aria-hidden="true"></i></td>
</template>
<template name="VenueSearch">
<div class="venueSearch">
<input type="text" class="searchInput" placeholder="Filter..." value="{{searchValue}}"/>
</div>
</template>