-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split manage/message and clean up those views #14
- Loading branch information
Showing
9 changed files
with
137 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,39 @@ | ||
<% if (@event.host === current_user) or admin_session? %> | ||
<h2 class="margin0"><%= link_to @event.workshop.title, edit_workshop_path(@event.workshop) %></h2> | ||
<p>hosted by <%= contextualized_user_link(@event.host, :linked => true) %> · | ||
<%= event_price(@event, :show_materials_fee => true) %> · | ||
<%= @event.max_attendees %> slots · | ||
<%= pluralize(@event.attendances.count, 'person') %> signed up · | ||
meets <%= @event.meetings.count == 1 ? 'once' : (@event.meetings.count == 2 ? 'twice' : pluralize(@event.meetings.count, 'time')) %> | ||
</p> | ||
<%= link_to 'message all attendees in series', manage_workshop_path(@event.workshop), class: 'pull-right' %> | ||
<p> | ||
<%= render 'reruns/meeting_times_list', :rerun => @event, :include_venue => false, :inline => true %> | ||
</p> | ||
<div class="well"> | ||
<h3>Message Attendees</h3> | ||
<ul class="nav nav-pills margin0"> | ||
<li class="active"><a href="#compose_sms" data-toggle="tab">Short message</a></li> | ||
<li><a href="#compose_email" data-toggle="tab">Long message</a></li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class='tab-pane active' id='compose_sms'> | ||
<%= render 'reruns/message_attendees', :rerun => @event, :url => sms_attendees_path(@event) %> | ||
</div> | ||
<div class='tab-pane' id='compose_email'> | ||
<%= render 'messages/form', :message => Message.new(:apropos => @event) %> | ||
</div> | ||
<div class="page-header"> | ||
<div class="pull-right"> | ||
<%= iconic_link_to 'Manage all attendees in series', manage_workshop_path(@event.workshop), class: 'btn btn-sm btn-default', title: 'manage all attendees' , icon: 'group' %> | ||
</div> | ||
<label>Manage attendees of:</label> | ||
<h2 class="margin0"><%= link_to @event.title, @event %></h2> | ||
<p> | ||
<%= render 'reruns/meeting_times_list', :rerun => @event, :include_venue => false, :inline => true %> | ||
</p> | ||
<p>hosted by <%= contextualized_user_link(@event.host, :linked => true) %> · | ||
<%= event_price(@event, :show_materials_fee => true) %> · | ||
<%= @event.max_attendees %> slots · | ||
<%= pluralize(@event.attendances.count, 'person') %> signed up<br/> | ||
meets <%= @event.meetings.count == 1 ? 'once' : (@event.meetings.count == 2 ? 'twice' : pluralize(@event.meetings.count, 'time')) %> · part of the series <%= link_to @event.title, my_workshops_path(:anchor => "w_#{@event.workshop.uuid}") %> | ||
</p> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
<ul class="nav nav-tabs margin0"> | ||
<li class="active"><a href="#attendees" data-toggle="tab">Attendees</a></li> | ||
<li><a href="#activity" data-toggle="tab">Activity</a></li> | ||
</ul> | ||
<div id="myTabContent" class="tab-content"> | ||
<div class="tab-pane active" id="attendees"> | ||
<%= render 'manage_attendances' %> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<ul class="nav nav-tabs margin0"> | ||
<li class="active"><a href="#attendees" data-toggle="tab">Attendees</a></li> | ||
<li><a href="#activity" data-toggle="tab">Activity</a></li> | ||
</ul> | ||
<div id="myTabContent" class="tab-content"> | ||
<div class="tab-pane active" id="attendees"> | ||
<%= render 'manage_attendances' %> | ||
</div> | ||
<div class="tab-pane" id="activity"> | ||
<%= render :partial => 'activities/index', :locals => {:activities_n_counts => @activities_n_counts} %> | ||
</div> | ||
<div class="tab-pane" id="activity"> | ||
<%= render :partial => 'activities/index', :locals => {:activities_n_counts => @activities_n_counts} %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<%# render :partial => 'events/attend_status_and_call_to_action' %> | ||
|
||
<div class="row"> | ||
<%# render :partial => 'activities/index', :locals => {:activities => @event.activities} %> | ||
</div> | ||
<%# render :partial => 'activities/index', :locals => {:activities => @event.activities} %> | ||
|
||
<%# render :partial => 'attendees_modal' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="page-header"> | ||
<div class="pull-right"> | ||
<%= iconic_link_to 'Message all attendees in series', message_workshop_path(@event.workshop), class: 'btn btn-sm btn-default', title: 'message all attendees' , icon: 'send' %> | ||
</div> | ||
<label>Message attendees of:</label> | ||
<h2 class="margin0"><%= link_to @event.title, @event %></h2> | ||
<p> | ||
<%= render 'reruns/meeting_times_list', :rerun => @event, :include_venue => false, :inline => true %> | ||
</p> | ||
<p>hosted by <%= contextualized_user_link(@event.host, :linked => true) %> · | ||
<%= event_price(@event, :show_materials_fee => true) %> · | ||
<%= @event.max_attendees %> slots · | ||
<%= pluralize(@event.attendances.count, 'person') %> signed up · | ||
meets <%= @event.meetings.count == 1 ? 'once' : (@event.meetings.count == 2 ? 'twice' : pluralize(@event.meetings.count, 'time')) %><br/> | ||
part of the series <%= link_to @event.title, my_workshops_path(:anchor => "w_#{@event.workshop.uuid}") %> | ||
</p> | ||
</div> | ||
<div class="well"> | ||
<ul class="nav nav-pills margin0"> | ||
<li class="active"><a href="#compose_sms" data-toggle="tab">Short message</a></li> | ||
<li><a href="#compose_email" data-toggle="tab">Long message</a></li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class='tab-pane active' id='compose_sms'> | ||
<%= render 'reruns/message_attendees', :rerun => @event, :url => sms_attendees_path(@event) %> | ||
</div> | ||
<div class='tab-pane' id='compose_email'> | ||
<%= render 'messages/form', :message => Message.new(:apropos => @event) %> | ||
</div> | ||
</div> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="page-header"> | ||
<label>Message all attendees from the series:</label> | ||
<h2 class="margin0"><%= link_to @workshop.title, my_workshops_path(:anchor => "w_#{@workshop.uuid}") %></h2> | ||
</div> | ||
<div class="alert alert-danger" role="alert"> | ||
Messages sent from this page will be broadcast to all <%= @workshop.attendees.where(:sms_short_messages => true).count %> people who have attended one of the <%= @workshop.events.count %> workshops in this series. Be careful. | ||
</div> | ||
<div class="well"> | ||
<ul class="nav nav-pills margin0"> | ||
<li class="active"><a href="#compose_sms" data-toggle="tab">Short message</a></li> | ||
<li><a href="#compose_email" data-toggle="tab">Long message</a></li> | ||
</ul> | ||
<div class="tab-content"> | ||
<div class='tab-pane active' id='compose_sms'> | ||
<%= render 'reruns/message_attendees', :rerun => @workshop, :url => sms_attendees_workshop_path(@workshop) %> | ||
</div> | ||
<div class='tab-pane' id='compose_email'> | ||
<%= render 'messages/form', :message => Message.new(:apropos => @workshop) %> | ||
</div> | ||
</div> | ||
</div> | ||
<%= render 'messages/modal_new', :message => Message.new, :to => :one_person %> | ||
|
||
|
||
<% ready_script do -%> | ||
<% if user_signed_in? %> | ||
$('#event_attendees a.message_user').on('click', function(e) { | ||
$('#new_message_modal .modal-header-content').html($(this).data('modal-header-content')); | ||
$('#new_message_modal #message__to_user_uuid').attr('value', $(this).data('id')); | ||
$('#new_message_modal').modal('show'); | ||
e.preventDefault(); | ||
}); | ||
<% end %> | ||
$(document).on('ajax:success', '#new_message_modal form', function(e, data, status, xhr) { | ||
$("#new_message_modal").modal('hide'); | ||
show_bootstrap_alert({text: "Your message has been sent.", type: 'success'}); | ||
}); | ||
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters