Move slides and rotations under tabs

This commit is contained in:
Juhana Luomanen
2017-05-27 13:33:03 +03:00
parent 9974b3c02c
commit 700896e3f8
+86 -74
View File
@@ -35,82 +35,94 @@
<li class="active"><a data-toggle="tab" href="#slides" role="tab">Slides</a></li> <li class="active"><a data-toggle="tab" href="#slides" role="tab">Slides</a></li>
<li class="nav-item"><a data-toggle="tab" href="#rotations " role="tab">Rotations</a></li> <li class="nav-item"><a data-toggle="tab" href="#rotations " role="tab">Rotations</a></li>
</ul> </ul>
<div class="row" ng-controller="infoadmin_ctrl"> <div class="tab-content">
<div class="col-xs-12 col-md-6"> <div id="slides" class="tab-pane active">
<h2>{% trans "Info items" %}</h2> <div class="row" ng-controller="infoadmin_ctrl">
<div>{% trans "Infoitems available for rotations" %}</div> <div class="col-xs-12 col-md-6">
<table class="table table-striped"> <h2>{% trans "Create new item" %}</h2>
<tr> <table class="table table-striped">
<th>{% trans "Item" %}</th> <tr>
<th>{% trans "Type" %}</th> <td>{% trans "Item type" %}</td>
<th>{% trans "Set duration" %}</th> <td>
<th>{% trans "Add to rotation" %}</th> <select class="form-control form-control-sm" ng-model="createtype", ng-options="t.name for t in infotypes">
<th>{% trans "Delete" %}</th> <option value=""></option>
</tr> </select>
<tr ng-repeat="i in infoitems | orderBy:['display_name','name']"> </td>
<td>{$ i.name $}</td> </tr>
<td>{$ i.display_name $}</td> </table>
<td><input type="number" min="1" max="60" class="form-control" ng-model="i.duration"></input></td> <div ng-include="createtype.create_template_url"></div>
<td><input type="button" class="btn btn-success" ng-click="createInstance(selected_rot.id, i.id, i.item_type, i.duration);" value="{% trans "Add" %}"></input></td> </div>
<td><input type="button" class="btn btn-danger" ng-click="deleteItem(i.item_type, i.id);" value="{% trans "Delete" %}"></input></td> <div class="col-xs-12 col-md-6">
</tr> <h2>{% trans "Info items" %}</h2>
</table> <div>{% trans "Infoitems available for rotations" %}</div>
<h2>{% trans "Create new item" %}</h2> <table class="table table-striped">
<table class="table table-striped"> <tr>
<tr> <th>{% trans "Item" %}</th>
<td>{% trans "Item type" %}</td> <th>{% trans "Type" %}</th>
<td> <th>{% trans "Set duration" %}</th>
<select class="form-control form-control-sm" ng-model="createtype", ng-options="t.name for t in infotypes"> <th>{% trans "Add to rotation" %}</th>
<option value=""></option> <th>{% trans "Delete" %}</th>
</select> </tr>
</td> <tr ng-repeat="i in infoitems | orderBy:['display_name','name']">
</tr> <td>{$ i.name $}</td>
</table> <td>{$ i.display_name $}</td>
<div ng-include="createtype.create_template_url"></div> <td><input type="number" min="1" max="60" class="form-control" ng-model="i.duration"></input></td>
</div> <td><input type="button" class="btn btn-success" ng-click="createInstance(selected_rot.id, i.id, i.item_type, i.duration);" value="{% trans "Add" %}"></input></td>
<div class="col-xs-12 col-md-6"> <td><input type="button" class="btn btn-danger" ng-click="deleteItem(i.item_type, i.id);" value="{% trans "Delete" %}"></input></td>
<h2>{% trans "Rotations" %}</h2> </tr>
<div> </table>
{% trans "Select rotation to edit" %}:
</div>
<table class="table table-striped">
<tr>
<th>{% trans "Rotation" %}</th>
<th>{% trans "id" %}</th>
<th>{% trans "Select" %}</th>
<th>{% trans "Preview" %}</th>
<th>{% trans "Delete" %}</th>
</tr>
<tr ng-repeat="r in rotations">
<td>{$ r.name $}</td>
<td>{$ r.id $}</td>
<td><input type="button" class="btn btn-info" ng-click="selectRotation(r.id)" value="{% trans "Select" %}"></td>
<td><a href="/infoscreen/{$ r.id $}"><input type="button" class="btn btn-primary" value="{% trans "Preview" %}"></a></td>
<td><input type="button" class="btn btn-danger" ng-click="deleteRotation(r.id)" value="{% trans "Delete" %}"></input></td>
</tr>
<tr>
<td><input type="text" class="form-control" ng-model="r.name" placeholder="{% trans "Name" %}"></input></td>
<td><input type="button" class="btn btn-success" ng-click="createRotation(r.name)" value="{% trans "Create new" %}"></input></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<h2>{% trans "Rotation" %}: {$ selected_rot.name $}</h2> </div>
<div>{% trans "Instances in currently selected rotation" %}:</div> </div>
<table class="table table-striped">
<tr>
<th>{% trans "Instance" %}</th>
<th>{% trans "Duration" %}</th>
<th>{% trans "Delete" %}</th>
</tr>
<tr ng-repeat="i in selected_rot.instances">
<td>{$ i.item.name $}</td><td>{$ i.duration $} s</td>
<td><input type="button" ng-click="deleteInstance(i.id);" value="{% trans "Delete" %}" class="btn btn-danger"></input></td>
</tr>
</table>
</div> </div>
<div id="rotations" class="tab-pane">
<div class="col-xs-12 col-md-6" ng-controller="infoadmin_ctrl">
<h2>{% trans "Rotations" %}</h2>
<div>
{% trans "Select rotation to edit" %}:
</div>
<table class="table table-striped">
<tr>
<th>{% trans "Rotation" %}</th>
<th>{% trans "id" %}</th>
<th>{% trans "Select" %}</th>
<th>{% trans "Preview" %}</th>
<th>{% trans "Delete" %}</th>
</tr>
<tr ng-repeat="r in rotations">
<td>{$ r.name $}</td>
<td>{$ r.id $}</td>
<td><input type="button" class="btn btn-info" ng-click="selectRotation(r.id)" value="{% trans "Select" %}"></td>
<td><a href="/infoscreen/{$ r.id $}"><input type="button" class="btn btn-primary" value="{% trans "Preview" %}"></a></td>
<td><input type="button" class="btn btn-danger" ng-click="deleteRotation(r.id)" value="{% trans "Delete" %}"></input></td>
</tr>
<tr>
<td><input type="text" class="form-control" ng-model="r.name" placeholder="{% trans "Name" %}"></input></td>
<td><input type="button" class="btn btn-success" ng-click="createRotation(r.name)" value="{% trans "Create new" %}"></input></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
<div class="col-xs-12 col-md-6">
<h2>{% trans "Rotation" %}: {$ selected_rot.name $}</h2>
<div>{% trans "Instances in currently selected rotation" %}:</div>
<table class="table table-striped">
<tr>
<th>{% trans "Instance" %}</th>
<th>{% trans "Duration" %}</th>
<th>{% trans "Delete" %}</th>
</tr>
<tr ng-repeat="i in selected_rot.instances">
<td>{$ i.item.name $}</td><td>{$ i.duration $} s</td>
<td><input type="button" ng-click="deleteInstance(i.id);" value="{% trans "Delete" %}" class="btn btn-danger"></input></td>
</tr>
</table>
</div>
</div>
</div>
</div> </div>
<div style="margin-top: 100px;"> <div style="margin-top: 100px;">
{% include "footer.html" %} {% include "footer.html" %}