mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-03 16:38:34 +02:00
86 lines
4.4 KiB
HTML
86 lines
4.4 KiB
HTML
<div class="poll-header">
|
|
<div class="header participants-header">
|
|
{{event.participants.length}} participants
|
|
</div>
|
|
<div class="header date-header" ng-repeat="d in event.dates">
|
|
<div class="daticon">
|
|
<div class="dow">
|
|
{{d | date: 'EEE'}}
|
|
</div>
|
|
<div class="day">
|
|
{{d | date: 'd'}}
|
|
</div>
|
|
<div class="month">
|
|
{{d | date : 'MMM'}}
|
|
</div>
|
|
<span class="count" ng-show="selectedDate($index)" ng-class={top:isTopDate($index)}>{{selectedDate($index)}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="header actions-header">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="poll-body">
|
|
<div class="poll-entry" ng-repeat="participant in event.participants">
|
|
<form novalidate ng-submit="update(participant); editMode = false">
|
|
<div class="cell name-cell">
|
|
<span class="avatar style-{{$index + 1}}">
|
|
<img src="/images/user.png" width="11" />
|
|
</span>
|
|
<input required autocomplete="off" type="text" class="form-control" ng-model="participant.name" ng-show="editMode" value="participant.name"/>
|
|
<span ng-hide="editMode" class="name editable" ng-click="editMode = true && !event.isClosed; edit(participant)">{{participant.name}}</span>
|
|
</div>
|
|
<div class="cell vote-cell" ng-repeat="date in event.dates">
|
|
<img src="/images/tick@2x.png" width="16" ng-hide="editMode" ng-if="participant.votes[$index]" />
|
|
<img src="/images/nope@2x.png" width="8" ng-hide="editMode" ng-if="!participant.votes[$index]" />
|
|
<input ng-model="participant.votes[$index]" ng-show="editMode" ng-false-value="false" type="checkbox" />
|
|
<div class="overlay" ng-show="editMode" ng-click="participant.votes[$index] = !participant.votes[$index]"></div>
|
|
</div>
|
|
<div class="cell action-cell" ng-hide="event.isClosed">
|
|
<button type="button" ng-hide="editMode" ng-click="editMode = true; edit(participant)" class="btn hover">Edit</button>
|
|
<button type="button" ng-hide="editMode" ng-click="delete(participant)" class="btn danger hover">Delete</button>
|
|
<button type="submit" ng-show="editMode" class="btn">Save</button>
|
|
<button type="button" ng-show="editMode" ng-click="editMode = false; cancel($index)" class="btn">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="poll-example" ng-class="{hidden : event.participants.length > 0}">
|
|
<div class="poll-entry" ng-repeat="example in examples">
|
|
<div class="cell name-cell">
|
|
<span class="avatar style-{{$index + 1}}">
|
|
<img src="/images/user.png" width="11" />
|
|
</span>
|
|
<span class="name">{{example.name}}</span>
|
|
</div>
|
|
<div class="cell vote-cell" ng-repeat="date in event.dates">
|
|
<img src="/images/tick@2x.png" width="16" ng-if="example.votes[$index]" />
|
|
<img src="/images/nope@2x.png" width="8" ng-if="!example.votes[$index]" />
|
|
</div>
|
|
<div class="cell action-cell">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="overlay">
|
|
<div class="overlay-text">
|
|
Fill in the form below to get started
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ng-hide="event.isClosed" class="poll-entry highlight">
|
|
<form novalidate name="formnew" ng-submit="save()">
|
|
<div class="cell name-cell">
|
|
<span class="avatar style-{{participant.style}}">
|
|
<img src="/images/user.png" width="11" />
|
|
</span>
|
|
<input autocomplete="off" name="username" type="text" class="form-control" placeholder="Your name..." ng-model="participant.name" required value="participant.name"/>
|
|
</div>
|
|
<div class="cell vote-cell" ng-repeat="date in event.dates">
|
|
<input ng-model="participant.votes[$index]" ng-false-value="false" type="checkbox" />
|
|
<div class="overlay" ng-click="participant.votes[$index] = !participant.votes[$index]"></div>
|
|
</div>
|
|
<div class="cell action-cell">
|
|
<button type="submit" ng-class="{ 'animated shake' : formnew.$submitted && formnew.$invalid }" class="btn">Save</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|