Merge
This commit is contained in:
parent
2ccd37a7af
commit
3af9bad30e
92 changed files with 2089 additions and 10693 deletions
|
|
@ -1,14 +1,13 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@cfp, :url => admin_conference_cfp_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||
= f.input :description, :hint => "Welcome text for the Call for Papers"
|
||||
= f.input :schedule_changes
|
||||
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."
|
||||
= f.input :rating_desc, :label => "Rating Description", :hint => "Enter comments about voting process.", :input_html => {:value => "1 is for 'I don't like this proposal',\n2 is for 'I am ok with this proposal.',\n3 is for 'I love this proposal!'", :rows => 5, :class => "span6"}
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row-fluid
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@cfp, :url => admin_conference_cfp_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||
= f.input :description, :hint => "Welcome text for the Call for Papers"
|
||||
= f.input :schedule_changes
|
||||
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."
|
||||
= f.input :rating_desc, :label => "Rating Description", :hint => "Enter comments about voting process.", :input_html => {:value => "1 is for 'I don't like this proposal',\n2 is for 'I am ok with this proposal.',\n3 is for 'I love this proposal!'", :rows => 5, :class => "span6"}
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,26 @@
|
|||
.well.sidebar-nav
|
||||
%ul.nav.nav-list
|
||||
%li.nav-header
|
||||
=@conference.short_title
|
||||
Settings
|
||||
%li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
|
||||
= link_to "Conference", admin_conference_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))}
|
||||
= link_to "Venue", admin_conference_venue_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_cfp_info_path(@conference.short_title))}
|
||||
= link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_rooms_list_path(@conference.short_title))}
|
||||
= link_to "Rooms", admin_conference_rooms_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_tracks_list_path(@conference.short_title))}
|
||||
= link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_eventtype_list_path(@conference.short_title))}
|
||||
= link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))}
|
||||
= link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))}
|
||||
= link_to "Social Events", admin_conference_social_events_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))}
|
||||
= link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_email_settings_path(@conference.short_title))}
|
||||
= link_to "Emails", admin_conference_email_settings_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
|
||||
= link_to "Questions", admin_conference_questions_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))}
|
||||
= link_to "Volunteers", admin_conference_volunteers_info_path(@conference.short_title)
|
||||
%ul.nav.nav-pills.nav-stacked
|
||||
%li{:class=> active_nav_li(admin_conference_path(@conference.short_title))}
|
||||
= link_to "Conference", admin_conference_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_venue_info_path(@conference.short_title))}
|
||||
= link_to "Venue", admin_conference_venue_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_cfp_info_path(@conference.short_title))}
|
||||
= link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_rooms_list_path(@conference.short_title))}
|
||||
= link_to "Rooms", admin_conference_rooms_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_tracks_list_path(@conference.short_title))}
|
||||
= link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_eventtype_list_path(@conference.short_title))}
|
||||
= link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_difficulty_levels_path(@conference.short_title))}
|
||||
= link_to "Difficulty Levels", admin_conference_difficulty_levels_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_social_events_path(@conference.short_title))}
|
||||
= link_to "Social Events", admin_conference_social_events_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_supporter_levels_path(@conference.short_title))}
|
||||
= link_to "Supporter Levels", admin_conference_supporter_levels_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_email_settings_path(@conference.short_title))}
|
||||
= link_to "Emails", admin_conference_email_settings_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_questions_path(@conference.short_title))}
|
||||
= link_to "Questions", admin_conference_questions_path(@conference.short_title)
|
||||
%li{:class=> active_nav_li(admin_conference_volunteers_info_path(@conference.short_title))}
|
||||
= link_to "Volunteers", admin_conference_volunteers_info_path(@conference.short_title)
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
|
||||
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
|
||||
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
|
||||
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
|
||||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
|
||||
= f.input :html_export_path, :hint => "The path for static HTML exports"
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
|
||||
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
|
||||
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
|
||||
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
|
||||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
|
||||
- if !@conference.logo.blank?
|
||||
= image_tag @conference.logo(:thumb)
|
||||
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
|
||||
= f.input :html_export_path, :hint => "The path for static HTML exports"
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Diet"
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_dietary_update_path(@conference.short_title)) do |f|
|
||||
= f.input :use_dietary_choices, :label => false
|
||||
= dynamic_association :dietary_choices, "Dietary Choices", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Diet"
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_dietary_update_path(@conference.short_title)) do |f|
|
||||
= f.input :use_dietary_choices, :label => false
|
||||
= dynamic_association :dietary_choices, "Dietary Choices", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_difficulty_levels_path(@conference.short_title)) do |f|
|
||||
= f.input :use_difficulty_levels, :label => false
|
||||
= dynamic_association :difficulty_levels, "Difficulty_Levels", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_difficulty_levels_path(@conference.short_title)) do |f|
|
||||
= f.input :use_difficulty_levels, :label => false
|
||||
= dynamic_association :difficulty_levels, "Difficulty_Levels", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,45 +1,43 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= link_to "Template Help", "#", :id => "template-help-link"
|
||||
#template-help
|
||||
Valid attributes:
|
||||
%table.table
|
||||
%tr
|
||||
%td {email}
|
||||
%td The user's email address
|
||||
%tr
|
||||
%td {name}
|
||||
%td The user's full name
|
||||
%tr
|
||||
%td {conference}
|
||||
%td The full conference title
|
||||
%tr
|
||||
%td {proposalslink}
|
||||
%td A link to the user's proposal page
|
||||
%tr
|
||||
%td {registrationlink}
|
||||
%td A link to the registration page
|
||||
%tr
|
||||
%td {eventtitle}
|
||||
%td The title of an accepted or rejected proposal
|
||||
|
||||
= semantic_form_for(@settings, :url => admin_conference_email_settings_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :send_on_registration, :label => false, :hint => "Send an email when the user registers for the conference?"
|
||||
= f.input :registration_subject
|
||||
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}
|
||||
= f.input :send_on_accepted, :label => false, :hint => "Send an email when the proposal is accepted?"
|
||||
= f.input :accepted_subject
|
||||
= f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.input :send_on_rejected, :label => false, :hint => "Send an email when the proposal is rejected?"
|
||||
= f.input :rejected_subject
|
||||
= f.input :rejected_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.input :send_on_confirmed_without_registration, :label => false, :hint => "Send an email when a user has a confirmed proposal, but isn't yet registered?"
|
||||
= f.input :confirmed_without_registration_subject
|
||||
= f.input :confirmed_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= link_to "Template Help", "#", :id => "template-help-link"
|
||||
#template-help
|
||||
Valid attributes:
|
||||
%table.table
|
||||
%tr
|
||||
%td {email}
|
||||
%td The user's email address
|
||||
%tr
|
||||
%td {name}
|
||||
%td The user's full name
|
||||
%tr
|
||||
%td {conference}
|
||||
%td The full conference title
|
||||
%tr
|
||||
%td {proposalslink}
|
||||
%td A link to the user's proposal page
|
||||
%tr
|
||||
%td {registrationlink}
|
||||
%td A link to the registration page
|
||||
%tr
|
||||
%td {eventtitle}
|
||||
%td The title of an accepted or rejected proposal
|
||||
= semantic_form_for(@settings, :url => admin_conference_email_settings_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :send_on_registration, :label => false, :hint => "Send an email when the user registers for the conference?"
|
||||
= f.input :registration_subject
|
||||
= f.input :registration_email_template, :input_html => { :rows => 10, :cols => 20}
|
||||
= f.input :send_on_accepted, :label => false, :hint => "Send an email when the proposal is accepted?"
|
||||
= f.input :accepted_subject
|
||||
= f.input :accepted_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.input :send_on_rejected, :label => false, :hint => "Send an email when the proposal is rejected?"
|
||||
= f.input :rejected_subject
|
||||
= f.input :rejected_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.input :send_on_confirmed_without_registration, :label => false, :hint => "Send an email when a user has a confirmed proposal, but isn't yet registered?"
|
||||
= f.input :confirmed_without_registration_subject
|
||||
= f.input :confirmed_email_template, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
||||
:javascript
|
||||
$(document).ready( function() {
|
||||
|
|
|
|||
|
|
@ -1,45 +1,42 @@
|
|||
.row-fluid
|
||||
.row
|
||||
.span12
|
||||
%h5{:style=>"text-align: right"}
|
||||
= link_to "Events Stats", "#", :id => "events-stats-link", :class => "btn btn-success"
|
||||
|
||||
#events-stats
|
||||
.span12
|
||||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th
|
||||
- @mystates.each do |state|
|
||||
.row
|
||||
.col-md-12
|
||||
= link_to "Show Events Stats", "#", :id => "events-stats-link", :class => "btn btn-default pull-right"
|
||||
.clearfix
|
||||
#events-stats
|
||||
.span12
|
||||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th
|
||||
- @mystates.each do |state|
|
||||
%th{:colspan => 2, :style => "text-align:center"}
|
||||
State "#{state.name}"
|
||||
%th{:colspan => 2, :style => "text-align:center"}
|
||||
State "#{state.name}"
|
||||
%th{:colspan => 2, :style => "text-align:center"}
|
||||
Total
|
||||
%br
|
||||
No & Time
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Total
|
||||
- @mystates.each do |mystate|
|
||||
%td
|
||||
%b
|
||||
= @eventstats["#{mystate.name}"]["count"]
|
||||
%td
|
||||
%b
|
||||
#{@eventstats["#{mystate.name}"]["length"] / 60} h #{@eventstats["#{mystate.name}"]["length"] - @eventstats["#{mystate.name}"]["length"] / 60 * 60} m
|
||||
%td
|
||||
%b= @events.count
|
||||
%td
|
||||
%b= show_time(@eventstats["totallength"])
|
||||
|
||||
- @mytypes.each do |mytype|
|
||||
Total
|
||||
%br
|
||||
No & Time
|
||||
%tr
|
||||
%td= "#{mytype.title} (#{show_time(mytype.length)})"
|
||||
- @mystates.each do |mystate|
|
||||
%td= @eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_count"] unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_length"]) unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= @eventstats["#{mytype.title}"]["count"]
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["length"])
|
||||
%td
|
||||
%b Total
|
||||
- @mystates.each do |mystate|
|
||||
%td
|
||||
%b
|
||||
= @eventstats["#{mystate.name}"]["count"]
|
||||
%td
|
||||
%b
|
||||
#{@eventstats["#{mystate.name}"]["length"] / 60} h #{@eventstats["#{mystate.name}"]["length"] - @eventstats["#{mystate.name}"]["length"] / 60 * 60} m
|
||||
%td
|
||||
%b= @events.count
|
||||
%td
|
||||
%b= show_time(@eventstats["totallength"])
|
||||
|
||||
- @mytypes.each do |mytype|
|
||||
%tr
|
||||
%td= "#{mytype.title} (#{show_time(mytype.length)})"
|
||||
- @mystates.each do |mystate|
|
||||
%td= @eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_count"] unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_length"]) unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= @eventstats["#{mytype.title}"]["count"]
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["length"])
|
||||
|
||||
|
||||
:javascript
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
= @event.title
|
||||
%br
|
||||
%span.muted
|
||||
%small
|
||||
= @event.subtitle
|
||||
.span2
|
||||
= link_to "Edit", edit_admin_conference_event_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary"
|
||||
= link_to "Edit", edit_admin_conference_event_path(@conference.short_title, @event), :class => "btn btn-mini btn-default pull-right"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table
|
||||
%tr
|
||||
%td{:style => "width:15%"}
|
||||
|
|
@ -161,7 +160,7 @@
|
|||
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
|
||||
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
|
||||
|
||||
.row-fluid
|
||||
.row
|
||||
= link_to "Comments (#{@comment_count})", "#", :id => "event-comment-link"
|
||||
#comments-div
|
||||
%hr
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
.container
|
||||
= render 'proposal/form'
|
||||
= render 'proposal/form'
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
= render :partial => "events_stats"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
%h2
|
||||
Events
|
||||
- if @events
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
- if @conference.call_for_papers.rating != 0
|
||||
%td{:style => "width:96px"}
|
||||
- if event.average_rating.to_f > 0
|
||||
%b #{event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
#{event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
%br
|
||||
#{pluralize(event.voters.length, 'voter')}
|
||||
%br
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
- else
|
||||
= label_tag "label_rating", "", :class => "avgrating"
|
||||
- else
|
||||
Rating: 0/#{@conference.call_for_papers.rating}
|
||||
0/#{@conference.call_for_papers.rating}
|
||||
%br
|
||||
|
||||
- if event.submitter.registrations.count < 1
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#proposal-content.tab-pane.active
|
||||
= render 'proposal'
|
||||
#history-content.tab-pane
|
||||
.span12
|
||||
.col-md-12
|
||||
%table.table
|
||||
%thead
|
||||
%th
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_eventtype_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :event_types, "Event Types", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_eventtype_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :event_types, "Event Types", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
.row-fluid
|
||||
.span6
|
||||
%h2
|
||||
People
|
||||
- if @people
|
||||
= "(#{@people.length})"
|
||||
.span6
|
||||
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
|
||||
= link_to "New person", new_admin_person_path, :class => "btn btn-success"
|
||||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
People
|
||||
- if @people
|
||||
= "(#{@people.length})"
|
||||
= link_to "New person", new_admin_person_path, :class => "btn btn-success pull-right"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#people
|
||||
%thead
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
.row-fluid
|
||||
.span6
|
||||
.row
|
||||
.col-md-6
|
||||
%legend Question
|
||||
= f.input :title, :label => "Your Question"
|
||||
= f.input :question_type
|
||||
= f.input :global, :label => "Make Global", :hint => "(Global questions are available for selection to all conferences)"
|
||||
.span6
|
||||
.col-md-6
|
||||
= dynamic_association :answers, "Answers", f, :hint => "Insert your answers in the order you want them to appear"
|
||||
|
|
@ -1,31 +1,29 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
.pull-right
|
||||
%b= link_to "Create New Question","#", "data-toggle" => "modal", "data-target" => "#new-question", :class => "btn btn-success"
|
||||
%br
|
||||
%br
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
.pull-right
|
||||
%b= link_to "Create New Question","#", "data-toggle" => "modal", "data-target" => "#new-question", :class => "btn btn-success"
|
||||
%br
|
||||
%br
|
||||
- if @questions.count > 0
|
||||
= semantic_form_for(@conference, :url => admin_conference_questions_update_conference_path(@conference.short_title), :method => 'put') do |f|
|
||||
.questions{:id => "myquestions"}
|
||||
= render :partial => "questions"
|
||||
= f.submit "Update Questions for #{@conference.short_title}", :class => "btn btn-primary", :confirm => "Are you sure you want to make these changes?"
|
||||
|
||||
- if @questions.count > 0
|
||||
|
||||
= semantic_form_for(@conference, :url => admin_conference_questions_update_conference_path(@conference.short_title), :method => 'put') do |f|
|
||||
|
||||
.questions{:id => "myquestions"}
|
||||
= render :partial => "questions"
|
||||
|
||||
= f.submit "Update Questions for #{@conference.short_title}", :class => "btn btn-primary", :confirm => "Are you sure you want to make these changes?"
|
||||
|
||||
.modal.hide.fade{:id => "new-question", "role" => "dialog", "aria-hidden" => "true"}
|
||||
.modal-header
|
||||
%h3{:id => "new-question-header"}
|
||||
Add new question
|
||||
.modal-body
|
||||
= semantic_form_for(@new_question, :url => admin_conference_questions_path(@conference.short_title), :method => :post) do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
%button{:class => "btn btn-primary"}
|
||||
Save
|
||||
.pull-right
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
.modal.fade{:id => "new-question", "role" => "dialog", "aria-hidden" => "true"}
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
%h3{:id => "new-question-header"}
|
||||
Add new question
|
||||
.modal-body
|
||||
= semantic_form_for(@new_question, :url => admin_conference_questions_path(@conference.short_title), :method => :post) do |f|
|
||||
= render :partial => "form", :locals => {:f => f}
|
||||
%button{:class => "btn btn-primary"}
|
||||
Save
|
||||
.pull-right
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
|
|
|
|||
|
|
@ -1,41 +1,35 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span12
|
||||
%h3
|
||||
Edit registration of #{@person.public_name} (#{@person.email}) for #{@conference.title}
|
||||
%br
|
||||
.row-fluid
|
||||
.span12
|
||||
= semantic_form_for(@registration, :url => admin_conference_registrations_edit_path(@conference.short_title, @registration.id), :html => { :method => :put }) do |f|
|
||||
|
||||
= f.inputs "Personal Information" do
|
||||
= f.fields_for :person do |p|
|
||||
= p.input :first_name, :as => :string
|
||||
= p.input :last_name, :as => :string
|
||||
= p.label :Nickname, :as => :string
|
||||
= p.text_field :irc_nickname, :as => :string
|
||||
= p.label :Affiliation
|
||||
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
|
||||
= f.inputs "Registration Information" do
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
||||
%span#supporter-link.help-block
|
||||
|
||||
= f.input :attending_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :handicapped_access_required, :label => false
|
||||
= f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2, :class => "span6"}
|
||||
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs "Are you planning to attend any of the parties?" do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
|
||||
|
||||
= f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" }
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
Edit registration of #{@person.public_name} (#{@person.email}) for #{@conference.title}
|
||||
%br
|
||||
.row
|
||||
.col-md-12
|
||||
= semantic_form_for(@registration, :url => admin_conference_registrations_edit_path(@conference.short_title, @registration.id), :html => { :method => :put }) do |f|
|
||||
= f.inputs "Personal Information" do
|
||||
= f.fields_for :person do |p|
|
||||
= p.input :first_name, :as => :string
|
||||
= p.input :last_name, :as => :string
|
||||
= p.label :Nickname, :as => :string
|
||||
= p.text_field :irc_nickname, :as => :string
|
||||
= p.label :Affiliation
|
||||
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
|
||||
= f.inputs "Registration Information" do
|
||||
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
||||
%span#supporter-link.help-block
|
||||
= f.input :attending_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :handicapped_access_required, :label => false
|
||||
= f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2, :class => "span6"}
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs "Are you planning to attend any of the parties?" do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
|
||||
= f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" }
|
||||
:javascript
|
||||
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
|
||||
var str = "";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
.row
|
||||
.span12
|
||||
.col-md-12
|
||||
%h3
|
||||
Create new account and registration
|
||||
.row
|
||||
.span12
|
||||
.col-md-12
|
||||
= semantic_form_for(@registration, :url => admin_conference_registrations_new_path(@conference.short_title), :html => { :method => :put }) do |f|
|
||||
|
||||
= f.inputs "Your details" do
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
|
||||
= link_to "New", admin_conference_registrations_new_path(@conference.short_title), :class => "btn btn-primary"
|
||||
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-success"
|
||||
= link_to "Export xlsx", {:format => :xlsx}, :class => "btn btn-success"
|
||||
.row-fluid
|
||||
.span12
|
||||
%h2
|
||||
Registrations
|
||||
- if @registrations
|
||||
= "(#{@registrations.length})"
|
||||
= " - Attended (#{@attended})"
|
||||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h2
|
||||
Registrations
|
||||
- if @registrations
|
||||
= "(#{@registrations.length})"
|
||||
= " - Attended (#{@attended})"
|
||||
.btn-group.pull-right
|
||||
= link_to "New", admin_conference_registrations_new_path(@conference.short_title), :class => "btn btn-default"
|
||||
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-default"
|
||||
= link_to "Export XLS", {:format => :xlsx}, :class => "btn btn-default"
|
||||
%table.table.table-bordered.table-striped.table-hover#registrations
|
||||
%thead
|
||||
%th
|
||||
|
|
@ -47,7 +46,7 @@
|
|||
- else
|
||||
= registration.send(field.to_sym)
|
||||
%td
|
||||
= link_to "Questions", "#", :class => "questions btn btn-success", :id => counter, :onclick => "toggle('row#{counter}')"
|
||||
= link_to "Questions", "javascript: void(0)", :class => "questions btn btn-success", :id => counter, :onclick => "toggle('row#{counter}')"
|
||||
|
||||
%td
|
||||
= link_to "Edit", admin_conference_registrations_edit_path(@conference.short_title, :id => registration.id), :method => :get, :class => "btn btn-primary"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_rooms_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :rooms, "Rooms", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_rooms_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :rooms, "Rooms", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_social_events_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :social_events, "Social Events", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_social_events_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :social_events, "Social Events", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
41
app/views/admin/stats/_events.html.haml
Normal file
41
app/views/admin/stats/_events.html.haml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
-if @events.count > 0
|
||||
%h2{:style => "text-align: center"}
|
||||
= "Events (#{@events.count})"
|
||||
|
||||
.row-fluid
|
||||
%h3
|
||||
%u Types per event state
|
||||
- if !@conference.event_types.empty?
|
||||
= render :partial => "events_types"
|
||||
- else
|
||||
%h4
|
||||
%i There are no tracks defined for this conference!
|
||||
|
||||
.row-fluid
|
||||
%h3
|
||||
%u Tracks per event state
|
||||
- if @no_track_all.count > 0
|
||||
%i= " (#{pluralize(@no_track_all.count, 'event')} not assigned to a track)"
|
||||
- if !@conference.tracks.empty?
|
||||
= render :partial => "events_tracks"
|
||||
- else
|
||||
%h4
|
||||
%i There are no tracks defined for this conference!
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%h3 Proposal Submissions over time
|
||||
.row-fluid
|
||||
.span12#events_time
|
||||
= render :partial => "events_time"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%br
|
||||
%h3 Overview of all events
|
||||
.row-fluid
|
||||
.span12#events_table
|
||||
= render :partial => "events_table"
|
||||
|
||||
- else
|
||||
%h5 There are no submitted events yet.
|
||||
34
app/views/admin/stats/_events_table.html.haml
Normal file
34
app/views/admin/stats/_events_table.html.haml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
%table.table.table-bordered.table-striped
|
||||
%thead
|
||||
%th
|
||||
- @mystates.each do |state|
|
||||
%th{:colspan => 2, :style => "text-align:center"}
|
||||
State "#{state.name}"
|
||||
%th{:colspan => 2, :style => "text-align:center"}
|
||||
Total
|
||||
%br
|
||||
No & Time
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Total
|
||||
- @mystates.each do |mystate|
|
||||
%td
|
||||
%b
|
||||
= @eventstats["#{mystate.name}"]["count"]
|
||||
%td
|
||||
%b
|
||||
#{@eventstats["#{mystate.name}"]["length"] / 60} h #{@eventstats["#{mystate.name}"]["length"] - @eventstats["#{mystate.name}"]["length"] / 60 * 60} m
|
||||
%td
|
||||
%b= @events.count
|
||||
%td
|
||||
%b= show_time(@eventstats["totallength"])
|
||||
|
||||
- @mytypes.each do |mytype|
|
||||
%tr
|
||||
%td= "#{mytype.title} (#{show_time(mytype.length)})"
|
||||
- @mystates.each do |mystate|
|
||||
%td= @eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_count"] unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["#{mystate.name}"]["type_state_length"]) unless @eventstats["#{mytype.title}"]["#{mystate.name}"] == nil
|
||||
%td= @eventstats["#{mytype.title}"]["count"]
|
||||
%td= show_time(@eventstats["#{mytype.title}"]["length"])
|
||||
93
app/views/admin/stats/_events_time.html
Normal file
93
app/views/admin/stats/_events_time.html
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<script>
|
||||
|
||||
var events = '<%= h @events.count%>';
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
events_time.to_json % >;
|
||||
|
||||
var valueLabelWidth = 10; // space reserved for value labels (right)
|
||||
var barHeight = 24; // height of one bar
|
||||
var barLabelWidth = 100; // space reserved for bar labels
|
||||
var barLabelPadding = 8; // padding between bar and bar labels (left)
|
||||
var gridLabelHeight = 18; // space reserved for gridline labels
|
||||
var gridChartOffset = 3; // space between start of grid and first bar
|
||||
var maxBarWidth = 420; // width of the bar with the max value
|
||||
var color = d3.scale.category20();
|
||||
|
||||
// accessor functions
|
||||
var barLabel = function (d) {
|
||||
return d['status'];
|
||||
};
|
||||
var barValue = function (d) {
|
||||
return d['value'] / events * 100;
|
||||
};
|
||||
var barValues = function (d) {
|
||||
return d['value'];
|
||||
};
|
||||
|
||||
// scales
|
||||
var yScale = d3.scale.ordinal().domain(d3.range(0, data.length)).rangeBands([0, data.length * barHeight]);
|
||||
var y = function (d, i) {
|
||||
return yScale(i);
|
||||
};
|
||||
var yText = function (d, i) {
|
||||
return y(d, i) + yScale.rangeBand() / 2;
|
||||
};
|
||||
var yMax = d3.max(data, function (d) {
|
||||
return barValue(d) + 15;
|
||||
});
|
||||
var x = d3.scale.linear().domain([0, yMax]).range([0, maxBarWidth]);
|
||||
var width = maxBarWidth + barLabelWidth + valueLabelWidth;
|
||||
// svg container element
|
||||
var chart = d3.select('#events_time').append("svg")
|
||||
.attr('width', maxBarWidth + barLabelWidth + valueLabelWidth)
|
||||
.attr('height', gridLabelHeight + gridChartOffset + data.length * barHeight);
|
||||
|
||||
// bar labels
|
||||
var labelsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + (barLabelWidth - barLabelPadding) + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
labelsContainer.selectAll('text').data(data).enter().append('text')
|
||||
.attr('y', yText)
|
||||
.attr('stroke', 'none')
|
||||
.attr('fill', 'black')
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr('text-anchor', 'end')
|
||||
.text(barLabel);
|
||||
|
||||
// bars
|
||||
var barsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + barLabelWidth + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
|
||||
barsContainer.selectAll("rect").data(data).enter().append("rect")
|
||||
.attr('y', y)
|
||||
.attr('height', yScale.rangeBand())
|
||||
.attr('width', function (d) {
|
||||
return x(barValue(d));
|
||||
})
|
||||
.attr('stroke', 'white')
|
||||
.attr('fill', function (d) {
|
||||
return color(barValue(d));
|
||||
});
|
||||
|
||||
// bar value labels
|
||||
barsContainer.selectAll("text").data(data).enter().append("text")
|
||||
.attr("x", 5)
|
||||
.attr("y", yText)
|
||||
.attr("dx", 3) // padding-left
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr("text-anchor", "start") // text-align: right
|
||||
.attr("fill", "black")
|
||||
.attr("stroke", "none")
|
||||
.text(function (d) {
|
||||
return d3.round(barValues(d), 2) + " (" + d3.round(barValue(d), 0) + "%)";
|
||||
});
|
||||
// start line
|
||||
barsContainer.append("line")
|
||||
.attr("y1", -gridChartOffset)
|
||||
.attr("y2", yScale.rangeExtent()[1] + gridChartOffset)
|
||||
.style("stroke", "#000");
|
||||
|
||||
|
||||
</script>
|
||||
35
app/views/admin/stats/_events_tracks.html.haml
Normal file
35
app/views/admin/stats/_events_tracks.html.haml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
.row-fluid
|
||||
- if !@track_state['new'].empty?
|
||||
.span4
|
||||
%h4 New Submissions
|
||||
- if @no_track_new.count > 0
|
||||
%h5= "#{pluralize(@no_track_new.count, 'event')} not assigned to a track"
|
||||
- else
|
||||
%h5
|
||||
.row-fluid
|
||||
.span12#events_tracks_new
|
||||
= render :partial => "events_tracks_new"
|
||||
|
||||
- if !@track_state['unconfirmed'].empty?
|
||||
.span4
|
||||
%h4 Accepted (Unconfirmed)
|
||||
- if @no_track_unconfirmed.count > 0
|
||||
%h5= "#{pluralize(@no_track_unconfirmed.count, 'event')} not assigned to a track"
|
||||
- else
|
||||
%h5 All events assigned to track!
|
||||
|
||||
.row-fluid
|
||||
.span12#events_tracks_unconfirmed
|
||||
= render :partial => "events_tracks_unconfirmed"
|
||||
|
||||
- if !@track_state['confirmed'].empty?
|
||||
.span4
|
||||
%h4 Accepted (Confirmed)
|
||||
- if @no_track_confirmed.count > 0
|
||||
%h5= "#{pluralize(@no_track_confirmed.count, 'event')} not assigned to a track"
|
||||
- else
|
||||
%h5 All events assigned to track!
|
||||
|
||||
.row-fluid
|
||||
.span12#events_tracks_confirmed
|
||||
= render :partial => "events_tracks_confirmed"
|
||||
99
app/views/admin/stats/_events_tracks_confirmed.html
Normal file
99
app/views/admin/stats/_events_tracks_confirmed.html
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.ordinal()
|
||||
.range(["#5254a3", "#6b6ecf", "#9c9ede "]);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_tracks_confirmed").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
track_state['confirmed'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_tracks_confirmed").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
99
app/views/admin/stats/_events_tracks_new.html
Normal file
99
app/views/admin/stats/_events_tracks_new.html
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.ordinal()
|
||||
.range(["#5254a3", "#6b6ecf", "#9c9ede "]);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_tracks_new").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
track_state['new'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_tracks_new").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
99
app/views/admin/stats/_events_tracks_unconfirmed.html
Normal file
99
app/views/admin/stats/_events_tracks_unconfirmed.html
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.ordinal()
|
||||
.range(["#5254a3", "#6b6ecf", "#9c9ede "]);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_tracks_unconfirmed").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
track_state['unconfirmed'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_tracks_unconfirmed").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
19
app/views/admin/stats/_events_types.html.haml
Normal file
19
app/views/admin/stats/_events_types.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.row-fluid
|
||||
- if !@type_state['new'].empty?
|
||||
.span4
|
||||
%h4 New Submissions: #{@type_state['new'].map{|x| x["value"]}.sum}
|
||||
.row-fluid
|
||||
.span12#events_types_new
|
||||
= render :partial => "events_types_new"
|
||||
- if !@type_state['unconfirmed'].empty?
|
||||
.span4
|
||||
%h4 Accepted (Unconfirmed): #{@type_state['unconfirmed'].map{|x| x["value"]}.sum}
|
||||
.row-fluid
|
||||
.span12#events_types_unconfirmed
|
||||
= render :partial => "events_types_unconfirmed"
|
||||
- if !@type_state['confirmed'].empty?
|
||||
.span4
|
||||
%h4 Accepted (Confirmed): #{@type_state['confirmed'].map{|x| x["value"]}.sum}
|
||||
.row-fluid
|
||||
.span12#events_types_confirmed
|
||||
= render :partial => "events_types_confirmed"
|
||||
98
app/views/admin/stats/_events_types_confirmed.html
Normal file
98
app/views/admin/stats/_events_types_confirmed.html
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.category20();
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_types_confirmed").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
type_state['confirmed'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_types_confirmed").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
98
app/views/admin/stats/_events_types_new.html
Normal file
98
app/views/admin/stats/_events_types_new.html
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.category20();
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.percent;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_types_new").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
type_state['new'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_types_new").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
98
app/views/admin/stats/_events_types_unconfirmed.html
Normal file
98
app/views/admin/stats/_events_types_unconfirmed.html
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.category20();
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#events_types_unconfirmed").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
type_state['unconfirmed'].to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.status;
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#events_types_unconfirmed").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -1,71 +1,93 @@
|
|||
<script>
|
||||
|
||||
var registered = '<%= h @registrations.count%>';
|
||||
var data = <%=raw @mydays.to_json %>;
|
||||
var registered = '<%= h @registrations.count%>';
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
registered_time.to_json % >;
|
||||
|
||||
var valueLabelWidth = 10; // space reserved for value labels (right)
|
||||
var barHeight = 24; // height of one bar
|
||||
var barLabelWidth = 100; // space reserved for bar labels
|
||||
var barLabelPadding = 8; // padding between bar and bar labels (left)
|
||||
var gridLabelHeight = 18; // space reserved for gridline labels
|
||||
var gridChartOffset = 3; // space between start of grid and first bar
|
||||
var maxBarWidth = 420; // width of the bar with the max value
|
||||
var color = d3.scale.category20();
|
||||
var valueLabelWidth = 10; // space reserved for value labels (right)
|
||||
var barHeight = 24; // height of one bar
|
||||
var barLabelWidth = 100; // space reserved for bar labels
|
||||
var barLabelPadding = 8; // padding between bar and bar labels (left)
|
||||
var gridLabelHeight = 18; // space reserved for gridline labels
|
||||
var gridChartOffset = 3; // space between start of grid and first bar
|
||||
var maxBarWidth = 420; // width of the bar with the max value
|
||||
var color = d3.scale.category20();
|
||||
|
||||
// accessor functions
|
||||
var barLabel = function(d) { return d['status']; };
|
||||
var barValue = function(d) { return d['value'] / registered * 100; };
|
||||
var barValues = function(d) { return d['value']; };
|
||||
|
||||
// scales
|
||||
var yScale = d3.scale.ordinal().domain(d3.range(0, data.length)).rangeBands([0, data.length * barHeight]);
|
||||
var y = function(d, i) { return yScale(i); };
|
||||
var yText = function(d, i) { return y(d, i) + yScale.rangeBand() / 2; };
|
||||
var yMax = d3.max(data, function(d){ return barValue(d) + 15; });
|
||||
var x = d3.scale.linear().domain([0, yMax]).range([0, maxBarWidth]);
|
||||
var width = maxBarWidth + barLabelWidth + valueLabelWidth;
|
||||
// svg container element
|
||||
var chart = d3.select('#registered_time').append("svg")
|
||||
.attr('width', maxBarWidth + barLabelWidth + valueLabelWidth)
|
||||
.attr('height', gridLabelHeight + gridChartOffset + data.length * barHeight);
|
||||
// accessor functions
|
||||
var barLabel = function (d) {
|
||||
return d['status'];
|
||||
};
|
||||
var barValue = function (d) {
|
||||
return d['value'] / registered * 100;
|
||||
};
|
||||
var barValues = function (d) {
|
||||
return d['value'];
|
||||
};
|
||||
|
||||
// bar labels
|
||||
var labelsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + (barLabelWidth - barLabelPadding) + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
labelsContainer.selectAll('text').data(data).enter().append('text')
|
||||
.attr('y', yText)
|
||||
.attr('stroke', 'none')
|
||||
.attr('fill', 'black')
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr('text-anchor', 'end')
|
||||
.text(barLabel);
|
||||
// scales
|
||||
var yScale = d3.scale.ordinal().domain(d3.range(0, data.length)).rangeBands([0, data.length * barHeight]);
|
||||
var y = function (d, i) {
|
||||
return yScale(i);
|
||||
};
|
||||
var yText = function (d, i) {
|
||||
return y(d, i) + yScale.rangeBand() / 2;
|
||||
};
|
||||
var yMax = d3.max(data, function (d) {
|
||||
return barValue(d) + 15;
|
||||
});
|
||||
var x = d3.scale.linear().domain([0, yMax]).range([0, maxBarWidth]);
|
||||
var width = maxBarWidth + barLabelWidth + valueLabelWidth;
|
||||
// svg container element
|
||||
var chart = d3.select('#registered_time').append("svg")
|
||||
.attr('width', maxBarWidth + barLabelWidth + valueLabelWidth)
|
||||
.attr('height', gridLabelHeight + gridChartOffset + data.length * barHeight);
|
||||
|
||||
// bars
|
||||
var barsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + barLabelWidth + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
// bar labels
|
||||
var labelsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + (barLabelWidth - barLabelPadding) + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
labelsContainer.selectAll('text').data(data).enter().append('text')
|
||||
.attr('y', yText)
|
||||
.attr('stroke', 'none')
|
||||
.attr('fill', 'black')
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr('text-anchor', 'end')
|
||||
.text(barLabel);
|
||||
|
||||
barsContainer.selectAll("rect").data(data).enter().append("rect")
|
||||
.attr('y', y)
|
||||
.attr('height', yScale.rangeBand())
|
||||
.attr('width', function(d) { return x(barValue(d)); })
|
||||
.attr('stroke', 'white')
|
||||
.attr('fill', function(d) { return color(barValue(d)); });
|
||||
// bars
|
||||
var barsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + barLabelWidth + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
|
||||
barsContainer.selectAll("rect").data(data).enter().append("rect")
|
||||
.attr('y', y)
|
||||
.attr('height', yScale.rangeBand())
|
||||
.attr('width', function (d) {
|
||||
return x(barValue(d));
|
||||
})
|
||||
.attr('stroke', 'white')
|
||||
.attr('fill', function (d) {
|
||||
return color(barValue(d));
|
||||
});
|
||||
|
||||
// bar value labels
|
||||
barsContainer.selectAll("text").data(data).enter().append("text")
|
||||
.attr("x", 5)
|
||||
.attr("y", yText)
|
||||
.attr("dx", 3) // padding-left
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr("text-anchor", "start") // text-align: right
|
||||
.attr("fill", "black")
|
||||
.attr("stroke", "none")
|
||||
.text(function (d) {
|
||||
return d3.round(barValues(d), 2) + " (" + d3.round(barValue(d), 0) + "%)";
|
||||
});
|
||||
// start line
|
||||
barsContainer.append("line")
|
||||
.attr("y1", -gridChartOffset)
|
||||
.attr("y2", yScale.rangeExtent()[1] + gridChartOffset)
|
||||
.style("stroke", "#000");
|
||||
|
||||
// bar value labels
|
||||
barsContainer.selectAll("text").data(data).enter().append("text")
|
||||
.attr("x", 5)
|
||||
.attr("y", yText)
|
||||
.attr("dx", 3) // padding-left
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr("text-anchor", "start") // text-align: right
|
||||
.attr("fill", "black")
|
||||
.attr("stroke", "none")
|
||||
.text(function(d) { return d3.round(barValues(d), 2) + " (" + d3.round(barValue(d), 0) + "%)"; });
|
||||
// start line
|
||||
barsContainer.append("line")
|
||||
.attr("y1", -gridChartOffset)
|
||||
.attr("y2", yScale.rangeExtent()[1] + gridChartOffset)
|
||||
.style("stroke", "#000");
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -1,35 +1,41 @@
|
|||
.row-fluid
|
||||
.span4
|
||||
- if @attendees > 0
|
||||
%h4{:style => "text-indent: 25px"}= "Registrations - Attendees (#{(@attendees.to_f / @registered * 100).round }%)"
|
||||
.row
|
||||
.col-md-4
|
||||
- if @registered > 0
|
||||
- if @attendees > 0
|
||||
%h4{:style => "text-indent: 25px"}= "Registrations - Attendees (#{(@attendees.to_f / @registered * 100).round }%)"
|
||||
- else
|
||||
%h4{:style => "text-indent: 25px"}= "Registrations - Attendees"
|
||||
.row-fluid
|
||||
.span12#registrations_attendees
|
||||
= render :partial => "registrations_attendees"
|
||||
- else
|
||||
%h4{:style => "text-indent: 25px"}= "Registrations - Attendees"
|
||||
.row-fluid
|
||||
.span12#registrations_attendees
|
||||
%h5 There are no registrations yet.
|
||||
|
||||
.span4
|
||||
%h4{:style => "text-indent: 10px"}= "Attendance of pre-registered"
|
||||
.row-fluid
|
||||
.span12#registered_attended
|
||||
.col-md-4
|
||||
- if @registered > 0
|
||||
%h4{:style => "text-indent: 10px"}= "Attendance of pre-registered"
|
||||
.row-fluid
|
||||
.span12#registered_attended
|
||||
= render :partial => "registered_attended"
|
||||
|
||||
.span4
|
||||
%h4{:style => "text-indent: 25px"}= "% of pre-registered"
|
||||
.row-fluid
|
||||
.span12#preregistered_onsite
|
||||
.col-md-4
|
||||
- if @registered > 0
|
||||
%h4{:style => "text-indent: 25px"}= "% of pre-registered"
|
||||
.row-fluid
|
||||
.span12#preregistered_onsite
|
||||
= render :partial => "preregistered_onsite"
|
||||
|
||||
.row-fluid
|
||||
.span6
|
||||
%h4= "Other Info"
|
||||
.row-fluid
|
||||
.span12#other_info
|
||||
.row
|
||||
.col-md-6
|
||||
- if @registered > 0
|
||||
%h4= "Other Info"
|
||||
.row-fluid
|
||||
.span12#other_info
|
||||
= render :partial => "other_info"
|
||||
|
||||
.span6
|
||||
%h4{:style => "text-indent: 98px"}= "Registrations over time"
|
||||
.row-fluid
|
||||
.span12#registered_time
|
||||
|
||||
= render :partial => "registered_attended"
|
||||
= render :partial => "registered_time"
|
||||
= render :partial => "preregistered_onsite"
|
||||
= render :partial => "registrations_attendees"
|
||||
= render :partial => "other_info"
|
||||
.col-md-6
|
||||
- if @registered > 0
|
||||
%h4{:style => "text-indent: 98px"}= "Registrations over time"
|
||||
.row-fluid
|
||||
.span12#registered_time
|
||||
= render :partial => "registered_time"
|
||||
|
|
|
|||
|
|
@ -1,96 +1,87 @@
|
|||
<script>
|
||||
var w = 250,
|
||||
h = 250,
|
||||
r = Math.min(w, h) / 2 - 10,
|
||||
inner = 80,
|
||||
color = d3.scale.category20c();
|
||||
var w = 250,
|
||||
h = 250,
|
||||
r = Math.min(w, h) / 2 - 10,
|
||||
inner = 80,
|
||||
color = d3.scale.category20c();
|
||||
|
||||
var registrations = '<%= h @registered %>';
|
||||
var attendees = '<%= h @attendees %>';
|
||||
var registrations = '<%= h @registered %>';
|
||||
var attendees = '<%= h @attendees %>';
|
||||
|
||||
var data = [
|
||||
{"status":"Registrations","value": registrations, "percent": ""},
|
||||
{"status":"Attendees","value": attendees, "percent": d3.round(attendees/registrations * 100)+"%"}
|
||||
];
|
||||
var data = [
|
||||
{"status": "Did Not Attend", "value": registrations - attendees, "percent": ""},
|
||||
{"status": "Attended", "value": attendees, "percent": d3.round(attendees / registrations * 100) + "%"}
|
||||
];
|
||||
|
||||
var vis = d3.select("#registrations_attendees")
|
||||
.append("svg:svg")
|
||||
.data([data])
|
||||
.attr("width", w)
|
||||
.attr("height", h)
|
||||
.append("svg:g")
|
||||
.attr("transform", "translate(" + r * 1.1 + "," + r * 1.1 + ")")
|
||||
var vis = d3.select("#registrations_attendees")
|
||||
.append("svg:svg")
|
||||
.data([data])
|
||||
.attr("width", w)
|
||||
.attr("height", h)
|
||||
.append("svg:g")
|
||||
.attr("transform", "translate(" + r * 1.1 + "," + r * 1.1 + ")")
|
||||
|
||||
var textTop = vis.append("text")
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.attr("class", "textTop")
|
||||
.text( "Registered: " + registrations)
|
||||
.attr("y", -10),
|
||||
textBottom = vis.append("text")
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.attr("class", "textBottom")
|
||||
.text("Attended: " + attendees)
|
||||
.attr("y", 10);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.innerRadius(inner)
|
||||
.outerRadius(r);
|
||||
|
||||
var arcOver = d3.svg.arc()
|
||||
.innerRadius(inner + 5)
|
||||
.outerRadius(r + 5);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.value(function(d) { return d.value; });
|
||||
|
||||
var arcs = vis.selectAll("g.slice")
|
||||
.data(pie)
|
||||
.enter()
|
||||
.append("svg:g")
|
||||
.attr("class", "slice")
|
||||
.on("mouseover", function(d) {
|
||||
d3.select(this).select("path").transition()
|
||||
.duration(200)
|
||||
.attr("d", arcOver)
|
||||
|
||||
textTop.text(d3.select(this).datum().data.status)
|
||||
.attr("y", -10);
|
||||
textBottom.text( d3.select(this).datum().data.value)
|
||||
var textTop = vis.append("text")
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.attr("class", "textTop")
|
||||
.text("Registered: " + registrations)
|
||||
.attr("y", -10),
|
||||
textBottom = vis.append("text")
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.attr("class", "textBottom")
|
||||
.text("Attended: " + attendees)
|
||||
.attr("y", 10);
|
||||
})
|
||||
.on("mouseout", function(d) {
|
||||
d3.select(this).select("path").transition()
|
||||
.duration(100)
|
||||
.attr("d", arc);
|
||||
|
||||
textTop.text("Registered: " + registrations)
|
||||
.attr("y", -10);
|
||||
textBottom.text("Attended: " + attendees);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.innerRadius(inner)
|
||||
.outerRadius(r);
|
||||
|
||||
var arcOver = d3.svg.arc()
|
||||
.innerRadius(inner + 5)
|
||||
.outerRadius(r + 5);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
arcs.append("svg:path")
|
||||
.attr("fill", function(d, i) { return color(i); } )
|
||||
.attr("d", arc);
|
||||
var arcs = vis.selectAll("g.slice")
|
||||
.data(pie)
|
||||
.enter()
|
||||
.append("svg:g")
|
||||
.attr("class", "slice");
|
||||
|
||||
var legend = d3.select("#registrations_attendees").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", r * 2)
|
||||
.attr("height", r)
|
||||
.selectAll("g")
|
||||
.data(data)
|
||||
.enter().append("g")
|
||||
.attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; });
|
||||
arcs.append("svg:path")
|
||||
.attr("fill", function (d, i) {
|
||||
return color(i);
|
||||
})
|
||||
.attr("d", arc);
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", function(d, i) { return color(i); });
|
||||
var legend = d3.select("#registrations_attendees").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", r * 2)
|
||||
.attr("height", r)
|
||||
.selectAll("g")
|
||||
.data(data)
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".35em")
|
||||
.text(function(d) { return "Total " + d.status; });
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", function (d, i) {
|
||||
return color(i);
|
||||
});
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".35em")
|
||||
.text(function (d) {
|
||||
return "Total " + d.status + " (" + d.value + ")";
|
||||
});
|
||||
</script>
|
||||
|
|
@ -1,5 +1,22 @@
|
|||
- if @tickets
|
||||
%h2
|
||||
= "Non-Free Tickets(#{@tickets.count})"
|
||||
.span4#tickets_time
|
||||
= render :partial => "tickets_time"
|
||||
- if @tickets.length > 0
|
||||
.row-fluid
|
||||
.span12
|
||||
%h2
|
||||
= "Non-Free Tickets (#{@tickets.count})"
|
||||
.row-fluid
|
||||
.span4
|
||||
%h4 Ticket distribution
|
||||
.row-fluid
|
||||
.span12#tickets_distribution
|
||||
= render :partial => "tickets_distribution"
|
||||
.row-fluid
|
||||
.span10
|
||||
%h4 Ticket sales over time
|
||||
.row-fluid
|
||||
.span12#tickets_time
|
||||
= render :partial => "tickets_time"
|
||||
- else
|
||||
- if @conference.use_supporter_levels
|
||||
%h5 No tickets have been bought yet.
|
||||
- else
|
||||
%h5 There are no tickets set for this conference.
|
||||
99
app/views/admin/stats/_tickets_distribution.html
Normal file
99
app/views/admin/stats/_tickets_distribution.html
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<style>
|
||||
|
||||
.arc path {
|
||||
stroke: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
var width = 250,
|
||||
height = 250,
|
||||
radius = Math.min(width, height) / 2;
|
||||
|
||||
var color = d3.scale.ordinal()
|
||||
.range(["#9ECAE1", "#6baed6", "#DEEBF7"]);
|
||||
|
||||
var arc = d3.svg.arc()
|
||||
.outerRadius(radius - 10)
|
||||
.innerRadius(0);
|
||||
|
||||
var pie = d3.layout.pie()
|
||||
.sort(null)
|
||||
.value(function (d) {
|
||||
return d.value;
|
||||
});
|
||||
|
||||
// Where to put the chart
|
||||
var svg = d3.select("#tickets_distribution").append("svg")
|
||||
.attr("width", width)
|
||||
.attr("height", height)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
|
||||
|
||||
var data =
|
||||
<
|
||||
%= raw
|
||||
@
|
||||
tickets_distribution.to_json % >;
|
||||
|
||||
var g = svg.selectAll(".arc")
|
||||
.data(pie(data))
|
||||
.enter().append("g")
|
||||
.attr("class", "arc");
|
||||
|
||||
g.append("path")
|
||||
.attr("d", arc)
|
||||
.style("fill", function (d) {
|
||||
return color(d.data.status);
|
||||
});
|
||||
|
||||
// Put text inside every piece of the pie-chart
|
||||
g.append("text")
|
||||
.attr("transform", function (d) {
|
||||
return "translate(" + arc.centroid(d) + ")";
|
||||
})
|
||||
.attr("dy", ".35em")
|
||||
.style("text-anchor", "middle")
|
||||
.text(function (d) {
|
||||
return d.data.percent + "%";
|
||||
});
|
||||
|
||||
// Title of chart
|
||||
svg.append("text")
|
||||
.attr("class", "title")
|
||||
.attr("x", radius)
|
||||
.attr("y", -radius + 10)
|
||||
.text("% of pre-registered");
|
||||
|
||||
// Create & position legend
|
||||
var legend = d3.select("#tickets_distribution").append("svg")
|
||||
.attr("class", "legend")
|
||||
.attr("width", radius * 2)
|
||||
.attr("height", radius)
|
||||
.selectAll("g")
|
||||
.data(color.domain().slice().reverse())
|
||||
.enter().append("g")
|
||||
.attr("transform", function (d, i) {
|
||||
return "translate(0," + i * 20 + ")";
|
||||
});
|
||||
|
||||
legend.append("rect")
|
||||
.attr("width", 18)
|
||||
.attr("height", 18)
|
||||
.style("fill", color);
|
||||
|
||||
legend.append("text")
|
||||
.attr("x", 24)
|
||||
.attr("y", 9)
|
||||
.attr("dy", ".15em")
|
||||
.text(function (d) {
|
||||
return d + " (" + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].value + " or " + data.filter(function (v) {
|
||||
return v.status === d;
|
||||
})[0].percent + "%)";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
@ -1,86 +1 @@
|
|||
<script>
|
||||
|
||||
var registered = '<%= h @registrations.count%>';
|
||||
var data = <%=raw @mytickets.to_json %>;
|
||||
|
||||
var valueLabelWidth = 40; // space reserved for value labels (right)
|
||||
var barHeight = 24; // height of one bar
|
||||
var barLabelWidth = 100; // space reserved for bar labels
|
||||
var barLabelPadding = 8; // padding between bar and bar labels (left)
|
||||
var gridLabelHeight = 18; // space reserved for gridline labels
|
||||
var gridChartOffset = 3; // space between start of grid and first bar
|
||||
var maxBarWidth = 420; // width of the bar with the max value
|
||||
|
||||
// accessor functions
|
||||
var barLabel = function(d) { return d['status']; };
|
||||
var barValue = function(d) { return d['value'] / registered * 100; };
|
||||
var barValues = function(d) { return d['value']; };
|
||||
|
||||
// scales
|
||||
var yScale = d3.scale.ordinal().domain(d3.range(0, data.length)).rangeBands([0, data.length * barHeight]);
|
||||
var y = function(d, i) { return yScale(i); };
|
||||
var yText = function(d, i) { return y(d, i) + yScale.rangeBand() / 2; };
|
||||
var x = d3.scale.linear().domain([0, 100]).range([0, maxBarWidth]);
|
||||
|
||||
// svg container element
|
||||
var chart = d3.select('#tickets_time').append("svg")
|
||||
.attr('width', maxBarWidth + barLabelWidth + valueLabelWidth)
|
||||
.attr('height', gridLabelHeight + gridChartOffset + data.length * barHeight);
|
||||
/*
|
||||
// grid line labels
|
||||
var gridContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + barLabelWidth + ',' + gridLabelHeight + ')');
|
||||
gridContainer.selectAll("text").data(x.ticks(10)).enter().append("text")
|
||||
.attr("x", x)
|
||||
.attr("dy", -3)
|
||||
.attr("text-anchor", "middle")
|
||||
.text(String);
|
||||
|
||||
// vertical grid lines
|
||||
gridContainer.selectAll("line").data(x.ticks(10)).enter().append("line")
|
||||
.attr("x1", x)
|
||||
.attr("x2", x)
|
||||
.attr("y1", 0)
|
||||
.attr("y2", yScale.rangeExtent()[1] + gridChartOffset)
|
||||
.style("stroke", "#ccc");*/
|
||||
|
||||
// bar labels
|
||||
var labelsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + (barLabelWidth - barLabelPadding) + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
labelsContainer.selectAll('text').data(data).enter().append('text')
|
||||
.attr('y', yText)
|
||||
.attr('stroke', 'none')
|
||||
.attr('fill', 'black')
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr('text-anchor', 'end')
|
||||
.text(barLabel);
|
||||
|
||||
// bars
|
||||
var barsContainer = chart.append('g')
|
||||
.attr('transform', 'translate(' + barLabelWidth + ',' + (gridLabelHeight + gridChartOffset) + ')');
|
||||
|
||||
barsContainer.selectAll("rect").data(data).enter().append("rect")
|
||||
.attr('y', y)
|
||||
.attr('height', yScale.rangeBand())
|
||||
.attr('width', function(d) { return x(barValue(d)); })
|
||||
.attr('stroke', 'white')
|
||||
.attr('fill', 'steelblue');
|
||||
|
||||
// bar value labels
|
||||
barsContainer.selectAll("text").data(data).enter().append("text")
|
||||
.attr("x", function(d) { return x(barValue(d)); })
|
||||
.attr("y", yText)
|
||||
.attr("dx", 3) // padding-left
|
||||
.attr("dy", ".35em") // vertical-align: middle
|
||||
.attr("text-anchor", "start") // text-align: right
|
||||
.attr("fill", "black")
|
||||
.attr("stroke", "none")
|
||||
.text(function(d) { return d3.round(barValues(d), 2) + " registrations (" + d3.round(barValue(d), 0) + "%)"; });
|
||||
// start line
|
||||
barsContainer.append("line")
|
||||
.attr("y1", -gridChartOffset)
|
||||
.attr("y2", yScale.rangeExtent()[1] + gridChartOffset)
|
||||
.style("stroke", "#000");
|
||||
|
||||
|
||||
</script>
|
||||
(Not yet implemented)
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
%ul.nav.nav-tabs#myTab
|
||||
%li.active
|
||||
%a{:href=>"#registrations", "data-toggle"=>"tab"} Registrations
|
||||
%li
|
||||
%a{:href=>"#events", "data-toggle"=>"tab"} Events
|
||||
%li
|
||||
%a{:href=>"#speakers", "data-toggle"=>"tab"} Speakers
|
||||
%li
|
||||
|
|
@ -11,6 +13,8 @@
|
|||
.tab-content
|
||||
.tab-pane.active#registrations
|
||||
= render :partial => 'registrations'
|
||||
.tab-pane#events
|
||||
= render :partial => 'events'
|
||||
.tab-pane#speakers
|
||||
= render :partial => 'speakers'
|
||||
.tab-pane#tickets
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_supporter_levels_path(@conference.short_title)) do |f|
|
||||
= f.input :use_supporter_levels, :label => false
|
||||
= dynamic_association :supporter_levels, "Supporter Levels", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_supporter_levels_path(@conference.short_title)) do |f|
|
||||
= f.input :use_supporter_levels, :label => false
|
||||
= dynamic_association :supporter_levels, "Supporter Levels", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
= f.input :code_is_valid, :as => :boolean, :label => false
|
||||
= f.action :submit, :button_html => { :value => "Save", :class => "btn btn-primary" }
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
|
||||
= link_to "New Supporter", "#", :id => "new-supporter-button", :class => "btn btn-success"
|
||||
.row-fluid
|
||||
.span12
|
||||
.row
|
||||
.col-md-12
|
||||
%h2 Supporters
|
||||
.well
|
||||
%table.table.table-striped#supporters
|
||||
|
|
@ -32,6 +32,6 @@
|
|||
%tr
|
||||
%td= u.name
|
||||
%td= u.email
|
||||
%td= u.supporter_level.title
|
||||
%td= u.supporter_level.title if u.supporter_level
|
||||
%td= u.code
|
||||
%td= u.code_is_valid
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_tracks_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :tracks, "Tracks", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_tracks_update_path(@conference.short_title)) do |f|
|
||||
= dynamic_association :tracks, "Tracks", f
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,76 +1,74 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span12
|
||||
%h2
|
||||
Users
|
||||
- if @users
|
||||
= "(#{@users.length})"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#users
|
||||
%thead
|
||||
%th
|
||||
%b ID
|
||||
%th
|
||||
%b State
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b Roles
|
||||
%th
|
||||
%th
|
||||
- @users.each do |user|
|
||||
- person = Person.find_person_by_user_id(user.id)
|
||||
%tr
|
||||
%td
|
||||
= user.id
|
||||
%td
|
||||
- if user.confirmed?
|
||||
confirmed
|
||||
- else
|
||||
unconfirmed
|
||||
%td
|
||||
= user.email
|
||||
%td
|
||||
= user.last_name
|
||||
%td
|
||||
= user.first_name
|
||||
%td
|
||||
= user.public_name
|
||||
%td
|
||||
= user.roles.map { |role| role.name }.join ','
|
||||
%td
|
||||
.modal.hide.fade{:id => "user-role-selection-#{user.id}", "role" => "dialog", "aria-hidden" => "true"}
|
||||
.modal-header
|
||||
%button{"type"=>"button", :class=>"close", "data-dismiss"=>"modal", "aria-hidden"=>"true"}
|
||||
×
|
||||
%h3{:id => "role-selector-header-#{user.id}"}
|
||||
Modifying Roles
|
||||
.modal-body
|
||||
- if current_user == user
|
||||
You cannot modify your own role!
|
||||
%br
|
||||
.row
|
||||
.col-md-12
|
||||
%h2
|
||||
Users
|
||||
- if @users
|
||||
= "(#{@users.length})"
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#users
|
||||
%thead
|
||||
%th
|
||||
%b ID
|
||||
%th
|
||||
%b State
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b Roles
|
||||
%th
|
||||
%th
|
||||
- @users.each do |user|
|
||||
- person = Person.find_person_by_user_id(user.id)
|
||||
%tr
|
||||
%td
|
||||
= user.id
|
||||
%td
|
||||
- if user.confirmed?
|
||||
confirmed
|
||||
- else
|
||||
unconfirmed
|
||||
%td
|
||||
= user.email
|
||||
%td
|
||||
= user.last_name
|
||||
%td
|
||||
= user.first_name
|
||||
%td
|
||||
= user.public_name
|
||||
%td
|
||||
= user.roles.map { |role| role.name }.join ','
|
||||
%td
|
||||
.modal.hide.fade{:id => "user-role-selection-#{user.id}", "role" => "dialog", "aria-hidden" => "true"}
|
||||
.modal-header
|
||||
%button{"type"=>"button", :class=>"close", "data-dismiss"=>"modal", "aria-hidden"=>"true"}
|
||||
×
|
||||
%h3{:id => "role-selector-header-#{user.id}"}
|
||||
Modifying Roles
|
||||
.modal-body
|
||||
- if current_user == user
|
||||
You cannot modify your own role!
|
||||
%br
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
- else
|
||||
= "Give #{user.public_name} (#{user.email}) the following roles:"
|
||||
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
|
||||
= f.input :roles, :label => false
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
|
||||
- else
|
||||
= "Give #{user.public_name} (#{user.email}) the following roles:"
|
||||
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
|
||||
= f.input :roles, :label => false
|
||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||
Cancel
|
||||
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}
|
||||
=link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}"
|
||||
%td
|
||||
=link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
||||
"data-html" => "true",
|
||||
"data-content" => user.popup_details,
|
||||
"data-original-title" => ""
|
||||
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}
|
||||
=link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}"
|
||||
%td
|
||||
=link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
||||
"data-html" => "true",
|
||||
"data-content" => user.popup_details,
|
||||
"data-original-title" => ""
|
||||
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :name, :input_html => {:rows => 1}
|
||||
= f.input :address, :input_html => {:rows => 1}
|
||||
= f.input :website
|
||||
= f.input :description, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :name, :input_html => {:rows => 1}
|
||||
= f.input :address, :input_html => {:rows => 1}
|
||||
= f.input :website
|
||||
= f.input :description, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.date_select :day %>
|
||||
<%= f.input :description, :input_html => {:rows => "2", :class => "span8"} %>
|
||||
<%= remove_association_link :vday, f %>
|
||||
<% end %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.date_select :day %>
|
||||
<%= f.input :description, :input_html => {:rows => "2", :class => "col-md-8"} %>
|
||||
<%= remove_association_link :vday, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
@ -1,19 +1,27 @@
|
|||
%table.table.table-striped.table-bordered.table-hover#speakertable
|
||||
%thead
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Email
|
||||
%th Mobile
|
||||
%th Languages
|
||||
%th Experience
|
||||
%th Tshirt Size
|
||||
%tbody
|
||||
- @volunteers.each do |volunteer|
|
||||
%tr
|
||||
%td= volunteer.first_name
|
||||
%td= volunteer.last_name
|
||||
%td= volunteer.email
|
||||
%td= volunteer.mobile
|
||||
%td= volunteer.languages
|
||||
%td= volunteer.volunteer_experience
|
||||
%td= volunteer.tshirt
|
||||
.well
|
||||
%table.table.table-striped.table-bordered.table-hover#volunteerstable
|
||||
%thead
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Email
|
||||
%th Mobile
|
||||
%th Languages
|
||||
%th Experience
|
||||
%th Tshirt Size
|
||||
%tbody
|
||||
- @volunteers.each do |volunteer|
|
||||
%tr
|
||||
%td= volunteer.first_name
|
||||
%td= volunteer.last_name
|
||||
%td= volunteer.email
|
||||
%td= volunteer.mobile
|
||||
%td= volunteer.languages
|
||||
%td= volunteer.volunteer_experience
|
||||
%td= volunteer.tshirt
|
||||
|
||||
:javascript
|
||||
$(document).ready(function(){
|
||||
$('#volunteerstable').dataTable({
|
||||
"bPaginate": false
|
||||
});
|
||||
});
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :description, :input_html => {:rows => "2", :class => "span8"}%>
|
||||
<%= f.input :vdays, :collection => @conference.vdays.map {|x| [x.day, x.id]}, :label => "Position is required for the following days:"%>
|
||||
<%= remove_association_link :vposition, f %>
|
||||
<% end %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :description, :input_html => {:rows => "2", :class => "col-md-8"} %>
|
||||
<%= f.input :vdays, :collection => @conference.vdays.map { |x| [x.day, x.id] }, :label => "Position is required for the following days:" %>
|
||||
<%= remove_association_link :vposition, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar'
|
||||
.span9
|
||||
= semantic_form_for(@conference, :url => admin_conference_volunteers_update_path(@conference.short_title)) do |f|
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
%br
|
||||
%br
|
||||
.span5
|
||||
.row
|
||||
.col-md-3
|
||||
= render 'admin/conference/sidebar'
|
||||
.col-md-9
|
||||
= semantic_form_for(@conference, :url => admin_conference_volunteers_update_path(@conference.short_title)) do |f|
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
%br
|
||||
%br
|
||||
= f.input :use_volunteers, :label => "Enable Volunteering"
|
||||
.row
|
||||
.col-md-6
|
||||
= f.input :use_vdays, :label => false
|
||||
= dynamic_association :vdays, "Volunteer Days", f
|
||||
.span5
|
||||
.col-md-6
|
||||
= f.input :use_vpositions, :label => false
|
||||
= dynamic_association :vpositions, "Volunteer positions", f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue