{* Even Registration App - Backbone.js *}
{* Underscore Templates for the Event Registration App *}
{* Template for Logged in Account *}{literal}
+<script src="//maps.googleapis.com/maps/api/js?sensor=true&key={$settings.google_maps_api_key}"></script>
<script type="text/template" id="account-template">
<span>Logged in as <%= fname %><%= lname %></span>
<a id="accountLogout">Logout</a>
{* Template for the regEvent *}{literal}
<script type="text/template" id="regEvent-template">
<div class="glm-row">
- <div class="glm-columns glm-small-12">
- <h2><%= event_name %></h2>
- <div>
- <% if ( this.getClassCount() == 0 ) { %>
- <p> Registrations not available at this time. </p>
- <% } else { %>
- <% if ( !time_specific ) { %>
- <p>Attend any time during event</p>
- <% _.each(reg_time, function(rTime){ %>
- <% if ( rTime.attendee_max > 0 ) { %>
- <p> Maximum Registrants: <%= rTime.attendee_max %><br>
- Currently Available: <%= rTime.attendees_available %> </p>
+ <div class="glm-columns glm-small-12 glm-reg-event-profile">
+ <h2 id="glm-reg-event-name"><%= event_name %></h2>
+ <div class="glm-row">
+ {/literal}
+
+ {if $regEvent.image}
+ <div class="glm-small-12 glm-medium-4 glm-columns glm-reg-image-container">
+ <img src="{$imgBaseUrl}/medium/{$regEvent.image}"/>
+
+ </div>
+ {/if}
+ <div class="glm-small-12 glm-medium-4 glm-columns glm-reg-event-profile-details-container">
+
+ <div class="glm-row">
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details"> {$regEvent.last_datetime.timestamp|date_format:"%A, %B %e, %Y"}</div>
+ {if $regEvent.first_datetime.timestamp != $regEvent.last_datetime.timestamp}
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"} - {$regEvent.last_datetime.timestamp|date_format:"%l:%M %p"}</div>
+ {else}
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details"> {$regEvent.first_datetime.timestamp|date_format:"%l:%M %p"}</div>
+ {/if}
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details"> {$regEvent.locations.name}</div>
+ </div>
+ </div>
+
+ <div class="glm-row">
+ {if $regEvent.locations.lat && $regEvent.locations.lon}
+ <div class="glm-small-12 glm-medium-4 glm-columns glm-reg-event-profile-map-container">
+ <div id="glm-reg-map-container">
+ <div id="glm-reg-map" class="glm-reg-map">(map loads here)</div>
+ </div>
+ </div>
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details">
+ <div id="glm-reg-detail-map-button" class="button map-button">View Map</div>
+ </div>
+ {/if}
+ {literal}
+ <% if ( descr ) { %><div class="glm-small-12 glm-columns glm-reg-event-profile-details"><%= descr %></div><% } %>
+ <% if ( terms ) { %><div class="glm-small-12 glm-columns glm-reg-event-profile-details"><%= terms %></div><% } %>
+
+ <div class="glm-small-12 glm-columns glm-reg-event-profile-details">
+ <% if ( this.getClassCount() == 0 ) { %>
+ <p> Registrations not available at this time. </p>
+ <% } else { %>
+ <% if ( !time_specific ) { %>
+ <p>Attend any time during event</p>
+ <% _.each(reg_time, function(rTime){ %>
+ <% if ( rTime.attendee_max > 0 ) { %>
+ <p> Maximum Registrants: <%= rTime.attendee_max %><br>
+ Currently Available: <%= rTime.attendees_available %> </p>
+ <% } %>
+ <% }); %>
+ <% } else { %>
<% } %>
- <% }); %>
- <% } else { %>
- <% } %>
- <% } %>
-
- <% if ( terms ) { %><p><%= terms %></p><% } %>
+ <% } %>
+ </div>
+ </div>
</div>
</div>
<div class="glm-columns glm-small-12 glm-reg-classes"></div>
{* Template for regClass *}{literal}
<script type="text/template" id="regClass-template">
<div class="glm-row">
- <div class="glm-columns glm-small-12 glm-large-6">
- <div class="glm-row">
- <span class="glm-reg-level-title"><%= name %></span>
- <div class="glm-columns glm-small-12">
+ <div class="glm-columns glm-small-12 glm-reg-class-container">
+ <div class="glm-row glm-reg-event-details">
+ <span class="glm-columns glm-small-12 glm-large-3 glm-reg-level-title glm-reg-level-info"><%= name %></span>
+
+ <div class="glm-columns glm-small-12 glm-large-2 glm-reg-level-info"> <%= reg_rate_name %> </div>
+ <% if( reg_rate_base_price ){ %>
+ <div class="glm-columns glm-small-12 glm-large-2 glm-reg-level-info"> Base Rate: $<%= reg_rate_base_price %> </div>
+ <% } %>
+ <% if( reg_rate_per_reg ){ %>
+ <div class="glm-columns glm-small-12 glm-large-2 glm-reg-level-info"> Per Registrant: $<%= reg_rate_per_reg %> </div>
+ <% } %>
+ <% if( registrant_credits ){ %>
+ <div class="glm-columns glm-small-12 glm-large-2 glm-reg-level-info"> Per Registrant: $<%= registrant_credits %> </div>
+ <% } %>
+
+ <div class="glm-columns glm-small-12 glm-reg-level-info">
<%- descr %>
</div>
- <div class="glm-columns glm-small-12"> <%= reg_rate_name %> </div>
- <div class="glm-columns glm-small-12"> Base Rate: $<%= reg_rate_base_price %> </div>
- <div class="glm-columns glm-small-12"> Per Registrant: $<%= reg_rate_per_reg %> </div>
- <div class="glm-columns glm-small-12"> Registrant Credits: <%= registrant_credits %> </div>
<div class="glm-columns glm-small-12 glm-hidden">
<% if ( app.timeSpecific ) { %>
<input class="timeSelection" type="hidden" name="timeOption">
<div class="reg-class-detail">
<div class="reg-class-times"> </div>
-
+
<% if ( app.timeSpecific ) { %>
<div class="glm-reg-warning glm-medium-up">
Please select a Date / Time!
<% } %>
</div>
</div>
- <div class="glm-columns glm-small-12 glm-large-6">
+<!-- <div class="glm-columns glm-small-12 glm-large-6">
<div id="eventCalendar-<%= id %>" style="width: 95%;"></div>
- </div>
+ </div>-->
</div>
</script>
{/literal}
{* Template for regTime *}{literal}
<script type="text/template" id="regTime-template">
- <b><%= start_datetime.datetime %></b>
- <div class="reg-class-accounts">
- <button class="glm-add-new-account tiny">Add {/literal}{$terms.reg_term_attendee_cap}{literal}</button>
- </div>
+ <% if ( app.timeSpecific ) { %>
+ <b><%= start_datetime.datetime %></b>
+ <% } %>
+ <button class="glm-add-new-account tiny">Add {/literal}{$terms.reg_term_attendee_cap}{literal}</button>
+ <div class="reg-class-accounts"></div>
</script>
{/literal}
{* Template for registrant add form *}{literal}
regEvent.setClasses( {$regClassesJSON} );
regEvent.setClassRegistrants( {$regJSON} );
var glmApp = new app.Views.Front.App();
+
+ $("#glm-reg-detail-map-button").click(function() {
+ var map_container = "#glm-reg-map-container";
+ var map = "#glm-reg-map";
+ var mapNewH = 0;
+ var mapOverflow = 'hidden';
+ var mapBtnTxt = 'view map';
+
+ if ($(map_container).height() == 0) {
+ mapNewH = 250;
+ mapV = 'visible';
+ mapBtnTxt = 'hide map'
+ }
+ $(map_container).animate({
+ overflow: mapOverflow,
+ height: mapNewH
+ }, 250, "swing", function() {
+
+ });
+ $(this).html(mapBtnTxt);
+ });
+ function initMap() {
+
+ // Set default - Need to make this configurable
+ var map = new google.maps.Map(document.getElementById('glm-reg-map'), {
+ zoom: {$settings.maps_default_zoom},
+
+ disableDefaultUI: false,
+ mapTypeId: google.maps.MapTypeId.MAP,
+ });
+
+ // Create a marker for this member
+
+
+ }
+ google.maps.event.addDomListener(window, 'load', initMap);
});
</script>