Change the speaker management buttons in the speaker page

This commit is contained in:
Oskar Hahn 2016-01-10 10:26:20 +01:00
parent 78ec776c3f
commit fd6190b7a7

View File

@ -44,8 +44,25 @@
<!-- TODO: <!-- TODO:
* show only 'add me' OR 'remove me' button * show only 'add me' OR 'remove me' button
--> -->
<button class="btn btn-default btn-sm" ng-click="showOldSpeakers = !showOldSpeakers"> <div os-perms="agenda.can_manage">
Show all old speakers <button ng-click="beginSpeech()"
class="btn btn-primary">
<i class="fa fa-play"></i>
<translate>Start next speaker</translate>
</button>
<button ng-click="endSpeech()"
class="btn btn-default">
<i class="fa fa-stop"></i>
<translate>Stop current speaker</translate>
</button>
</div>
<div>
<button ng-click="showOldSpeakers = !showOldSpeakers"
class="btn btn-sm btn-default spacer">
<i ng-if="!showOldSpeakers" class="fa fa-toggle-off"></i>
<i ng-if="showOldSpeakers"class="fa fa-toggle-on"></i>
<translate>Show all speakers</translate>
</button> </button>
<div uib-collapse="!showOldSpeakers"> <div uib-collapse="!showOldSpeakers">
<h3 translate>Old speakers:</h3> <h3 translate>Old speakers:</h3>
@ -56,12 +73,25 @@
[{{ speaker.begin_time | date:'yyyy-MM-dd HH:mm:ss' }} [{{ speaker.begin_time | date:'yyyy-MM-dd HH:mm:ss' }}
{{ speaker.end_time | date:'yyyy-MM-dd HH:mm:ss' }}] {{ speaker.end_time | date:'yyyy-MM-dd HH:mm:ss' }}]
</small> </small>
<button os-perms="agenda.can_manage" ng-click="removeSpeaker(speaker.id)"
class="btn btn-default btn-xs">
<i class="fa fa-times"></i>
</button>
</ol> </ol>
</div> </div>
</div>
<h3 translate>Current speaker:</h3> <h3 translate class="">Current speaker:</h3>
<strong ng-repeat="speaker in item.speakers | filter: {end_time: null, begin_time: '!!'}"> <strong ng-repeat="speaker in item.speakers | filter: {end_time: null, begin_time: '!!'}">
{{ speaker.user.get_full_name() }} {{ speaker.user.get_full_name() }}
<button os-perms="agenda.can_manage" ng-click="removeSpeaker(speaker.id)"
class="btn btn-default btn-xs">
<i class="fa fa-times"></i>
</button>
<button os-perms="agenda.can_manage" ng-click="endSpeech()"
class="btn btn-default btn-xs">
<i class="fa fa-stop"></i>
</button>
</strong> </strong>
<h3 translate>Next speakers:</h3> <h3 translate>Next speakers:</h3>
@ -112,16 +142,5 @@
<i class="fa fa-minus"></i> <i class="fa fa-minus"></i>
<translate>Remove me</translate> <translate>Remove me</translate>
</button> </button>
<p os-perms="agenda.can_manage">
<button ng-click="beginSpeech()"
class="btn btn-primary">
<i class="fa fa-play"></i>
<translate>Start next speaker</translate>
</button>
<button ng-click="endSpeech()"
class="btn btn-default">
<i class="fa fa-stop"></i>
<translate>Stop current speaker</translate>
</button>
</div> </div>
</div> </div>