Skip to content

Commit

Permalink
Replace capacity with total attendees on attendance sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
petschekr committed Apr 17, 2016
1 parent 8a45314 commit 3e318a1
Showing 1 changed file with 5 additions and 37 deletions.
42 changes: 5 additions & 37 deletions World Perspectives/public/components/admin/session-display.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,42 +110,7 @@
<iron-ajax auto url="[[_computeSessionURL()]]" handle-as="json" last-response="{{session}}" on-error="handleError"></iron-ajax>
<iron-ajax auto url="[[_computeDataURL()]]" handle-as="json" last-response="{{attendees}}" on-error="handleError"></iron-ajax>
<button onclick="window.print()">Print</button>
<!--
<template is="dom-repeat" items="[[data]]" as="schedule">
<div class="schedule">
<img src="/img/logo.svg">
<h4 class="name">[[schedule.name]]</h4>
<h4 class="date">[[date.formatted]]</h4>
<div class="clear"></div>
<hr />

<table-repeat rows="[[schedule.schedule]]" id="scheduleTable">
<table>
<thead></thead>
<tbody></tbody>
</table>
<template is="dom-template" class="row-template">
<table>
<tr>
<td class="longtime">[[item.time.start.formatted]] – [[item.time.end.formatted]]</td>
<td>
<template is="dom-if" if="{{!item.editable}}">
{{item.title}}
</template>
<template is="dom-if" if="{{item.editable}}">
<b>{{item.title}}</b>
<br />
<i>{{item.people}}</i>
</template>
</td>
<td>{{item.location}}</td>
</tr>
</table>
</template>
</table-repeat>
</div>
</template>
-->
<div class="presentation">
<h4>
{{session.title.formatted}}
Expand All @@ -163,8 +128,8 @@ <h4>
[[session.moderator.name]]
</template>
<br />
<b>Capacity:</b>
[[session.capacity.filled]] of [[session.capacity.total]]
<b>Total attendees:</b>
[[_computeAttendees(attendees)]]
</p>
<table-repeat rows="[[attendees.faculty]]">
<table>
Expand Down Expand Up @@ -236,6 +201,9 @@ <h4>
return "Presenters";
}
},
_computeAttendees: function (attendees) {
return attendees.faculty.length + attendees.students.length;
},
handleError: function (e) {
var errorMessage = e.target.lastError.error.message || "An error occurred!";
console.error(errorMessage);
Expand Down

0 comments on commit 3e318a1

Please sign in to comment.