First checkin
This commit is contained in:
parent
f207e2c8b7
commit
90b30db9e8
260 changed files with 37349 additions and 0 deletions
11
app/views/admin/callforpapers/show.html.haml
Normal file
11
app/views/admin/callforpapers/show.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Call for Papers"
|
||||
.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.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
26
app/views/admin/conference/_sidebar.html.haml
Normal file
26
app/views/admin/conference/_sidebar.html.haml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
.well.sidebar-nav
|
||||
%ul.nav.nav-list
|
||||
- if activated == "Conference"
|
||||
%li.active= link_to "Conference", "#"
|
||||
- else
|
||||
%li= link_to "Conference", admin_conference_path(@conference.short_title)
|
||||
- if activated == "Call for Papers"
|
||||
%li.active= link_to "Call for Papers", "#"
|
||||
- else
|
||||
%li= link_to "Call for Papers", admin_conference_cfp_info_path(@conference.short_title)
|
||||
- if activated == "Venue"
|
||||
%li.active= link_to "Venue", "#"
|
||||
- else
|
||||
%li= link_to "Venue", admin_conference_venue_info_path(@conference.short_title)
|
||||
- if activated == "Rooms"
|
||||
%li.active= link_to "Rooms", "#"
|
||||
- else
|
||||
%li= link_to "Rooms", admin_conference_rooms_list_path(@conference.short_title)
|
||||
- if activated == "Tracks"
|
||||
%li.active= link_to "Tracks", "#"
|
||||
- else
|
||||
%li= link_to "Tracks", admin_conference_tracks_list_path(@conference.short_title)
|
||||
- if activated == "Event Types"
|
||||
%li.active= link_to "Event Types", "#"
|
||||
- else
|
||||
%li= link_to "Event Types", admin_conference_eventtype_list_path(@conference.short_title)
|
||||
3
app/views/admin/conference/index.html.haml
Normal file
3
app/views/admin/conference/index.html.haml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
%ul
|
||||
- @conferences.each do |conference|
|
||||
%li= link_to conference.title, admin_conference_path(conference.short_title)
|
||||
13
app/views/admin/conference/new.html.haml
Normal file
13
app/views/admin/conference/new.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
= semantic_form_for(@conference, :url => admin_conference_index_path) do |f|
|
||||
= f.inputs "Basic Information" do
|
||||
= f.input :title, :hint => "The name of your conference as it shall appear throughout the site. Example: 'OpenSUSE Conference 2013'"
|
||||
= f.input :short_title, :hint => "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'"
|
||||
= 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.inputs "Scheduling" do
|
||||
= f.input :timezone, :as => :time_zone, :hint => "Please select in what time zone your conference will take place. This is needed to correctly display times for your events."
|
||||
= 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 :html_export_path, :hint => "The path for static HTML exports"
|
||||
= f.actions do
|
||||
= f.action :submit, :button_html => {:class => "btn primary"}
|
||||
17
app/views/admin/conference/show.html.haml
Normal file
17
app/views/admin/conference/show.html.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Conference"
|
||||
.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 :html_export_path, :hint => "The path for static HTML exports"
|
||||
= f.input :cfp_open, :label => false, :hint => "Allow people to submit papers?"
|
||||
= f.input :registration_open, :label => false, :hint => "Allow people to register as attendees?"
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
6
app/views/admin/events/_person_fields.html.haml
Normal file
6
app/views/admin/events/_person_fields.html.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
.nested-fields
|
||||
= f.inputs do
|
||||
= f.input :email
|
||||
= f.input :public_name
|
||||
= remove_association_link :person, f
|
||||
|
||||
2
app/views/admin/events/edit.html.haml
Normal file
2
app/views/admin/events/edit.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.container
|
||||
= render 'proposal/form'
|
||||
48
app/views/admin/events/index.html.haml
Normal file
48
app/views/admin/events/index.html.haml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Submitter
|
||||
%th
|
||||
%b Type
|
||||
%th
|
||||
%b State
|
||||
- @events.each do |event|
|
||||
%tr
|
||||
%td
|
||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||
%td
|
||||
- if !event.submitter.nil?
|
||||
=link_to event.submitter.public_name, admin_person_path(event.submitter)
|
||||
- else
|
||||
Unknown submitter
|
||||
%td
|
||||
= event.event_type.title
|
||||
%td
|
||||
- if event.state == "withdrawn"
|
||||
Withdrawn
|
||||
- else
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= event.state.humanize
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- if event.transition_possible? :accept
|
||||
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => false),
|
||||
:method => :put, :hint => "Accept this event without sending an automated email."
|
||||
- if event.transition_possible? :reject
|
||||
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => false),
|
||||
:method => :put, :confirm => "Are you sure?",
|
||||
:hint => "Reject this event without sending an automated email."
|
||||
- if event.transition_possible? :start_review
|
||||
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :start_review),
|
||||
:method => :put
|
||||
- if event.transition_possible? :confirm
|
||||
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :confirm),
|
||||
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
||||
- if event.transition_possible? :cancel
|
||||
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel),
|
||||
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
||||
112
app/views/admin/events/show.html.haml
Normal file
112
app/views/admin/events/show.html.haml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
.row-fluid
|
||||
.span10
|
||||
%h3
|
||||
= @event.title
|
||||
%i= @event.subtitle
|
||||
|
||||
.span2
|
||||
= link_to "Edit Submission", edit_admin_conference_event_path(@conference.short_title, @event),
|
||||
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b State
|
||||
%td
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
= @event.state.humanize
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- if @event.transition_possible? :accept
|
||||
%li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :accept, :send_mail => false),
|
||||
:method => :put, :hint => "Accept this event without sending an automated email."
|
||||
- if @event.transition_possible? :reject
|
||||
%li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :reject, :send_mail => false),
|
||||
:method => :put, :confirm => "Are you sure?",
|
||||
:hint => "Reject this event without sending an automated email."
|
||||
- if @event.transition_possible? :start_review
|
||||
%li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :start_review),
|
||||
:method => :put
|
||||
- if @event.transition_possible? :confirm
|
||||
%li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :confirm),
|
||||
:method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place."
|
||||
- if @event.transition_possible? :cancel
|
||||
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :cancel),
|
||||
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@conference.short_title, @event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
%tr
|
||||
%td
|
||||
%b Biography
|
||||
%td
|
||||
= simple_format(@event.submitter.biography)
|
||||
%tr
|
||||
%td
|
||||
%b Submitted on
|
||||
%td= @event.created_at
|
||||
%tr
|
||||
%td
|
||||
%b Last updated on
|
||||
%td= @event.updated_at
|
||||
%tr
|
||||
%td
|
||||
%b Abstract
|
||||
%td= simple_format(@event.abstract)
|
||||
%tr
|
||||
%td
|
||||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
- if @event.event_attachments.size > 0
|
||||
%table.table
|
||||
%thead
|
||||
%th
|
||||
%b Filename
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Size
|
||||
%th
|
||||
%b Public?
|
||||
%th
|
||||
%tbody
|
||||
- @event.event_attachments.each do |a|
|
||||
%tr
|
||||
%td
|
||||
= link_to a.attachment_file_name, conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id)
|
||||
%td
|
||||
= a.title
|
||||
%td
|
||||
= number_to_human_size a.attachment_file_size
|
||||
%td
|
||||
- if a.public?
|
||||
Public
|
||||
- else
|
||||
Not Public
|
||||
%td
|
||||
= 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
|
||||
= link_to "Comments (#{@comment_count})", "#", :id => "event-comment-link"
|
||||
#comments-div
|
||||
%hr
|
||||
%ul.media
|
||||
%div
|
||||
.row-fluid
|
||||
= form_tag(comment_admin_conference_event_path(@conference.short_title, @event.id), :method => :post) do
|
||||
= text_area_tag(:comment, "")
|
||||
= submit_tag "Add Comment", :class => "btn btn-primary pull-right"
|
||||
%br
|
||||
- @comments.each do |comment|
|
||||
%div
|
||||
= raw format_comments(comment)
|
||||
7
app/views/admin/eventtype/_event_type_fields.html.erb
Normal file
7
app/views/admin/eventtype/_event_type_fields.html.erb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :length, :input_html => {:size => 3} %>
|
||||
<%= remove_association_link :event_type, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
8
app/views/admin/eventtype/event_type_list.html.haml
Normal file
8
app/views/admin/eventtype/event_type_list.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Event Types"
|
||||
.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"}
|
||||
18
app/views/admin/people/index.html.haml
Normal file
18
app/views/admin/people/index.html.haml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b # of Conference Registrations
|
||||
%th
|
||||
- @people.each do |person|
|
||||
%tr
|
||||
%td= person.last_name
|
||||
%td= person.first_name
|
||||
%td= person.public_name
|
||||
%td= person.registrations.count
|
||||
%td= link_to "View", admin_person_path(person)
|
||||
49
app/views/admin/people/show.html.haml
Normal file
49
app/views/admin/people/show.html.haml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
%table.table
|
||||
%tr
|
||||
%td
|
||||
%b First Name
|
||||
%td
|
||||
= @person.first_name
|
||||
%tr
|
||||
%td
|
||||
%b Last Name
|
||||
%td
|
||||
= @person.last_name
|
||||
%tr
|
||||
%td
|
||||
%b Public Name
|
||||
%td
|
||||
= @person.public_name
|
||||
%tr
|
||||
%td
|
||||
%b Company
|
||||
%td
|
||||
= @person.company
|
||||
%tr
|
||||
%td
|
||||
%b Email
|
||||
%td
|
||||
= @person.email
|
||||
%tr
|
||||
%td
|
||||
%b Created At
|
||||
%td
|
||||
= @person.created_at
|
||||
%tr
|
||||
%td
|
||||
%b Updated At
|
||||
%td
|
||||
= @person.updated_at
|
||||
%tr
|
||||
%td
|
||||
%b Biography
|
||||
%td
|
||||
= @person.biography
|
||||
%tr
|
||||
%td
|
||||
%b Registered to attend
|
||||
%td
|
||||
- if @person.registrations.count == 0
|
||||
None
|
||||
- else
|
||||
= @person.registrations.map { |r| r.conference.title }.join ','
|
||||
48
app/views/admin/registrations/show.html.haml
Normal file
48
app/views/admin/registrations/show.html.haml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
.row-fluid
|
||||
.span12
|
||||
.pull-right{:style=>"margin-top:20px; margin-bottom:20px;"}
|
||||
= link_to "Export PDF", admin_conference_registrations_path(@conference.short_title, :format => :pdf), :class => "btn btn-success"
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Attending Social Events
|
||||
%th
|
||||
%b Attending With Partner
|
||||
%th
|
||||
%b Arrival Date
|
||||
%th
|
||||
%b Departure Date
|
||||
%th
|
||||
%th
|
||||
- @registrations.each do |registration|
|
||||
%tr
|
||||
%td
|
||||
= registration.last_name
|
||||
%td
|
||||
= registration.first_name
|
||||
%td
|
||||
= registration.public_name
|
||||
%td
|
||||
= registration.email
|
||||
%td
|
||||
= registration.attending_social_events
|
||||
%td
|
||||
= registration.attending_social_events_with_partner
|
||||
%td
|
||||
= registration.arrival
|
||||
%td
|
||||
= registration.departure
|
||||
%td
|
||||
= link_to "Edit", "#", :class => "btn btn-primary"
|
||||
%td
|
||||
= link_to "Delete", "#", :class => "btn btn-danger", :confirm => "Really delete registration for #{registration.public_name}?"
|
||||
38
app/views/admin/registrations/show.pdf.prawn
Normal file
38
app/views/admin/registrations/show.pdf.prawn
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf|
|
||||
table_array = []
|
||||
header_array = [" ",
|
||||
"Last Name",
|
||||
"First Name",
|
||||
"Public Name",
|
||||
"Email",
|
||||
"Attending Social Events",
|
||||
"Attending With Partner",
|
||||
"Arrival Date",
|
||||
"Departure Date"]
|
||||
table_array << header_array
|
||||
@registrations.each do |registration|
|
||||
row = []
|
||||
row << ""
|
||||
row << registration.last_name
|
||||
row << registration.first_name
|
||||
row << registration.public_name
|
||||
row << registration.email
|
||||
if registration.attending_social_events
|
||||
row << "X"
|
||||
else
|
||||
row << " "
|
||||
end
|
||||
|
||||
if registration.attending_social_events_with_partner.to_s
|
||||
row << "X"
|
||||
else
|
||||
row << " "
|
||||
end
|
||||
row << registration.arrival
|
||||
row << registration.departure
|
||||
table_array << row
|
||||
end
|
||||
|
||||
pdf.text "#{@conference.title} Registrations", :font_size => 25
|
||||
pdf.table table_array, :header => true, :cell_style => {:size => 5, :border_width => 1}
|
||||
end
|
||||
8
app/views/admin/rooms/_room_fields.html.erb
Normal file
8
app/views/admin/rooms/_room_fields.html.erb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :size, :input_html => {:size => 5} %>
|
||||
<%= f.input :public, :as => :boolean %>
|
||||
<%= remove_association_link :room, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
8
app/views/admin/rooms/rooms_list.html.haml
Normal file
8
app/views/admin/rooms/rooms_list.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Rooms"
|
||||
.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"}
|
||||
8
app/views/admin/tracks/_track_fields.html.erb
Normal file
8
app/views/admin/tracks/_track_fields.html.erb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :color, :input_html => {:size => 6} %>
|
||||
<%= f.input :description, :input_html => {:rows => 2 } %>
|
||||
<%= remove_association_link :track, f %>
|
||||
<% end %>
|
||||
</div>
|
||||
8
app/views/admin/tracks/tracks_list.html.haml
Normal file
8
app/views/admin/tracks/tracks_list.html.haml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Tracks"
|
||||
.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"}
|
||||
57
app/views/admin/users/index.html.haml
Normal file
57
app/views/admin/users/index.html.haml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span12
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%th
|
||||
%b Email
|
||||
%th
|
||||
%b Last Name
|
||||
%th
|
||||
%b First Name
|
||||
%th
|
||||
%b Public Name
|
||||
%th
|
||||
%b Roles
|
||||
%th
|
||||
%th
|
||||
- @users.each do |user|
|
||||
%tr
|
||||
%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
|
||||
= 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", "#", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
||||
"data-html" => "true",
|
||||
"data-content" => user.popup_details,
|
||||
"data-original-title" => ""
|
||||
|
||||
11
app/views/admin/venue/venue_info.html.haml
Normal file
11
app/views/admin/venue/venue_info.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span3
|
||||
= render 'admin/conference/sidebar', :activated => "Venue"
|
||||
.span9
|
||||
= semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
|
||||
= f.input :name
|
||||
= f.input :address
|
||||
= f.input :website
|
||||
= f.input :description, :input_html => { :rows => 10, :cols => 20 }
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
22
app/views/conference_registration/register.html.haml
Normal file
22
app/views/conference_registration/register.html.haml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span12
|
||||
%h3.pull-left
|
||||
Registration for
|
||||
= @conference.title
|
||||
.row-fluid
|
||||
.span12
|
||||
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f|
|
||||
= f.fields_for :person do
|
||||
= f.inputs :public_name, :for => :person
|
||||
= f.input :attending_social_events, :label => false
|
||||
= f.input :attending_social_events_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :arrival, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
|
||||
= f.input :departure, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||
- if @registered
|
||||
= f.action :submit, :button_html => { :value => "Update Registration", :class => "btn btn-primary" }
|
||||
= link_to "Unregister", register_conference_path(@conference.short_title),:method => :delete, :class => "btn btn-danger",
|
||||
:confirm => "Are you sure you want to unregister?"
|
||||
- else
|
||||
= f.action :submit, :button_html => { :value => "Register", :class => "btn btn-primary" }
|
||||
12
app/views/devise/confirmations/new.html.erb
Normal file
12
app/views/devise/confirmations/new.html.erb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<p>Welcome <%= @resource.email %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
||||
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
|
||||
16
app/views/devise/passwords/edit.html.erb
Normal file
16
app/views/devise/passwords/edit.html.erb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<h2>Change your password</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div><%= f.label :password, "New password" %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Change my password" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
12
app/views/devise/passwords/new.html.erb
Normal file
12
app/views/devise/passwords/new.html.erb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
21
app/views/devise/registrations/_edit_account.html.erb
Normal file
21
app/views/devise/registrations/_edit_account.html.erb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, :autocomplete => "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password %></div>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
20
app/views/devise/registrations/_edit_profile.html.erb
Normal file
20
app/views/devise/registrations/_edit_profile.html.erb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<% if false %>
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= f.fields_for :person do |p| %>
|
||||
<h2><%= p.label :first_name %></h2>
|
||||
<p><%= p.text_field :first_name %></p>
|
||||
|
||||
<h2><%= p.label :last_name %></h2>
|
||||
<p><%= p.text_field :last_name %></p>
|
||||
<% end %>
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= f.fields_for :person do |p| %>
|
||||
<%= f.inputs :first_name, :last_name, :for => :person %>
|
||||
<% end %>
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
18
app/views/devise/registrations/edit.html.erb-backup
Normal file
18
app/views/devise/registrations/edit.html.erb-backup
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<%= devise_error_messages! %>
|
||||
<%= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
|
||||
<%= f.inputs :name => "Profile" do %>
|
||||
<%= f.fields_for :person do |p| %>
|
||||
<%= f.inputs :first_name, :last_name, :for => :person %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= f.inputs :name => "Account" do %>
|
||||
<%= f.input :email %>
|
||||
<%= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"} %>
|
||||
<%= f.input :password_confirmation, :input_html => {:autocomplete => "off"} %>
|
||||
<%= f.input :current_password, :input_html => {:autocomplete => "off"}, :hint => "(we need your current password to confirm your changes)" %>
|
||||
<% end %>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
19
app/views/devise/registrations/edit.html.haml
Normal file
19
app/views/devise/registrations/edit.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.container
|
||||
.row-fluid
|
||||
= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
|
||||
= f.inputs :name => "Profile" do
|
||||
= f.fields_for :person do |p|
|
||||
= p.inputs :first_name, :last_name, :public_name
|
||||
= p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
||||
= p.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count')"}, :for => :person
|
||||
You have used
|
||||
%span#biography-count #{current_user.person.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
= f.inputs :name => "Account" do
|
||||
= f.input :email, :required => false
|
||||
= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"}
|
||||
= f.input :password_confirmation, :input_html => {:autocomplete => "off"}
|
||||
= f.input :current_password, :input_html => {:autocomplete => "off"}, :hint => "(we need your current password to confirm password or email changes)"
|
||||
= f.submit "Update"
|
||||
18
app/views/devise/registrations/new.html.erb
Normal file
18
app/views/devise/registrations/new.html.erb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<h2>Sign up</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.submit "Sign up" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
18
app/views/devise/sessions/new.html.erb-backup
Normal file
18
app/views/devise/sessions/new.html.erb-backup
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
13
app/views/devise/sessions/new.html.haml
Normal file
13
app/views/devise/sessions/new.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.container
|
||||
%h2.center-text
|
||||
Sign in
|
||||
.row
|
||||
.span6.offset3
|
||||
= semantic_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
|
||||
= f.input :email
|
||||
= f.input :password
|
||||
- if devise_mapping.rememberable?
|
||||
= f.input :remember_me, :as=> :boolean
|
||||
= f.submit "Sign in"
|
||||
|
||||
= render "devise/shared/links"
|
||||
25
app/views/devise/shared/_links.erb
Normal file
25
app/views/devise/shared/_links.erb
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
12
app/views/devise/unlocks/new.html.erb
Normal file
12
app/views/devise/unlocks/new.html.erb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Resend unlock instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
38
app/views/home/index.html.haml
Normal file
38
app/views/home/index.html.haml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
.container-fluid
|
||||
%h1.center-text
|
||||
Upcoming Conferences
|
||||
- @conferences.each do |conference|
|
||||
- if conference.cfp_open?
|
||||
.well
|
||||
%h2.center-text
|
||||
= conference.title
|
||||
%h4.center-text
|
||||
= conference.date_range_string
|
||||
.center-text
|
||||
%i
|
||||
%a= link_to conference.venue.name, conference.venue.website
|
||||
,
|
||||
= conference.venue.address
|
||||
.row-fluid{:style => "padding-top: 30px;"}
|
||||
.span4
|
||||
- if conference.user_registered?(current_user)
|
||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
%i.icon-thumbs-up You're attending!
|
||||
- else
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-thumbs-down
|
||||
You haven't registered yet!
|
||||
.span4.offset4.pull-right
|
||||
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
|
||||
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-star
|
||||
You've submitted
|
||||
%b= current_user.person.proposal_count conference
|
||||
proposals!
|
||||
- else
|
||||
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "mainbutton center-text"
|
||||
44
app/views/layouts/_admin_navigation.html.haml
Normal file
44
app/views/layouts/_admin_navigation.html.haml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
- if @conference.nil? || @conference.short_title.nil?
|
||||
= link_to "OSEM", admin_conference_index_path, :class => 'brand'
|
||||
- else
|
||||
= link_to @conference.title, admin_conference_path(@conference.short_title), :class => 'brand'
|
||||
- if @conference && !@conference.short_title.nil?
|
||||
%ul.nav
|
||||
- if current_page?(admin_conference_registrations_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to "Registrations", "#"
|
||||
- else
|
||||
%li
|
||||
= link_to "Registrations", admin_conference_registrations_path(@conference.short_title)
|
||||
- if current_page?(admin_conference_events_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to "Events", "#"
|
||||
- else
|
||||
%li
|
||||
= link_to "Events", admin_conference_events_path(@conference.short_title)
|
||||
%ul.nav.secondary-nav.pull-right
|
||||
- if !@conference.nil?
|
||||
%li.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
Export
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
%li= link_to "JSON", "#"
|
||||
%li= link_to "HTML", "#"
|
||||
%li.dropdown
|
||||
- unless Conference.count == 1 && !has_role?(current_user, "admin")
|
||||
= link_to "#", :class => "dropdown-toggle" do
|
||||
Conferences
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- conferences = Conference.order("created_at DESC")
|
||||
- unless conferences.nil?
|
||||
- conferences.each do |c|
|
||||
- unless @conference == c
|
||||
%li= link_to c.short_title, admin_conference_path(c.short_title)
|
||||
- if has_role?(current_user, "admin")
|
||||
%li= link_to "New Conference", new_admin_conference_path
|
||||
- if has_role?(current_user, "admin")
|
||||
%li= link_to "Users", admin_users_path
|
||||
%li= link_to "People", admin_people_path
|
||||
%li= link_to "Log out", destroy_user_session_path, :method => :delete
|
||||
5
app/views/layouts/_messages.html.haml
Normal file
5
app/views/layouts/_messages.html.haml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
- flash.each do |name, msg|
|
||||
- if msg.is_a?(String)
|
||||
%div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
|
||||
%a.close{"data-dismiss" => "alert"} ×
|
||||
= content_tag :div, msg, :id => "flash_#{name}"
|
||||
11
app/views/layouts/_navigation.html.haml
Normal file
11
app/views/layouts/_navigation.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
= link_to "OSEM", root_path, :class => 'brand'
|
||||
%ul.nav.pull-right
|
||||
- if user_signed_in?
|
||||
%li
|
||||
= link_to('Logout', destroy_user_session_path, :method=>'delete')
|
||||
- else
|
||||
%li
|
||||
= link_to('Login', new_user_session_path)
|
||||
- if user_signed_in?
|
||||
%li
|
||||
= link_to('Edit account', edit_user_registration_path)
|
||||
27
app/views/layouts/admin.html.haml
Normal file
27
app/views/layouts/admin.html.haml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{:charset => "utf-8"}
|
||||
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
||||
%title= content_for?(:title) ? yield(:title) : "Admin"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
= render 'layouts/admin_navigation'
|
||||
.container
|
||||
.content
|
||||
#wrap
|
||||
#inner-content
|
||||
.row-fluid
|
||||
.span12
|
||||
= render 'layouts/messages'
|
||||
.row-fluid
|
||||
.span12
|
||||
= yield
|
||||
35
app/views/layouts/application.html.haml
Normal file
35
app/views/layouts/application.html.haml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{:charset => "utf-8"}
|
||||
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1, maximum-scale=1"}
|
||||
%title= content_for?(:title) ? yield(:title) : "OSEM"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
= render 'layouts/navigation'
|
||||
.container
|
||||
.content
|
||||
#wrap
|
||||
#inner-content
|
||||
.row-fluid
|
||||
.span12
|
||||
= render 'layouts/messages'
|
||||
.row-fluid
|
||||
.span12
|
||||
= yield
|
||||
#push
|
||||
#footer
|
||||
.container
|
||||
%p.muted.credit.center-text{:style => "font-size: 10px;"}
|
||||
OSEM is (C) 2013
|
||||
= link_to "Matt Barringer", "http://incoherent.de"
|
||||
and released under the GPL. You can get the source code from
|
||||
= link_to "Github.", "https://github.com/mbarringer/osem"
|
||||
142
app/views/proposal/_form.html.haml
Normal file
142
app/views/proposal/_form.html.haml
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
%li.active
|
||||
= link_to "Proposal", "#proposal-content", "data-toggle"=>"tab"
|
||||
%li
|
||||
= link_to "Attachments", "#attachment-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
#proposal-content.tab-pane.active
|
||||
.span12
|
||||
= semantic_form_for(@event, :url => @url) do |f|
|
||||
%section#basic
|
||||
= f.inputs :name => "Basic Information" do
|
||||
= f.input :title, :required => true
|
||||
= f.input :subtitle
|
||||
= f.input :abstract, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'abstract-count')"}, :required => true
|
||||
You have used
|
||||
%span#abstract-count #{@event.abstract_word_count}
|
||||
words. Abstracts are limited to 250 words.
|
||||
%br
|
||||
%br
|
||||
= f.input :description, :input_html => {:rows => 5}, :hint => "This will only be shown to organizers, not to attendees."
|
||||
%section#details
|
||||
= f.inputs :name => "Event Details" do
|
||||
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false
|
||||
%section#information
|
||||
= f.inputs :name => "Your Information" do
|
||||
= semantic_fields_for @person do |p|
|
||||
= p.input :public_name, :required => true
|
||||
= p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
||||
= p.input :biography, :required => true, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count')"}
|
||||
You have used
|
||||
%span#biography-count #{@person.biography_word_count}
|
||||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
|
||||
%section#speakers
|
||||
= f.inputs :name => "Additional Speakers" do
|
||||
Will there be any additional speakers? If so, please enter their full names, email address, and a short
|
||||
biography for each.
|
||||
= f.input :proposal_additional_speakers, :input_html => {:rows => 5}, :label => false
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
#attachment-content.tab-pane
|
||||
.span12
|
||||
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event),
|
||||
:html => { :multipart => true, :id => "fileupload" } do |f|
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%th
|
||||
%th
|
||||
%b Filename
|
||||
%th
|
||||
%b Title
|
||||
%th
|
||||
%b Size
|
||||
%th
|
||||
%b Public
|
||||
%th
|
||||
%tbody.files
|
||||
.row-fluid.fileupload-buttonbar
|
||||
.btn.btn-success.fileinput-button
|
||||
%i.icon-plus.icon-white
|
||||
Add files...
|
||||
= f.file_field :attachment
|
||||
= f.hidden_field :event_id, :value => @event.id
|
||||
|
||||
:javascript
|
||||
$(document).ready( function() {
|
||||
$('#fileupload').fileupload();
|
||||
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
|
||||
var inputs = data.context.find(':input');
|
||||
if (inputs.filter('[required][value=""]').first().focus().length) {
|
||||
return false;
|
||||
}
|
||||
data.formData = inputs.serializeArray();
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
:plain
|
||||
<script id="template-upload" type="text/x-tmpl">
|
||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||
<tr class="template-upload fade">
|
||||
<td class="preview"><span class="fade"></span></td>
|
||||
<td class="name"><span>{%=file.name%}</span></td>
|
||||
<td class="name"><input type="text" name="title[]" value="{%=file.name%}"/></td>
|
||||
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
|
||||
<td class="name"><input checked type="checkbox" name="public">Public</input></td>
|
||||
{% if (file.error) { %}
|
||||
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||
{% } else if (o.files.valid && !i) { %}
|
||||
<td>
|
||||
<div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
|
||||
</td>
|
||||
<td class="start">{% if (!o.options.autoUpload) { %}
|
||||
<button class="btn btn-primary">
|
||||
<i class="icon-upload icon-white"></i>
|
||||
<span>{%=locale.fileupload.start%}</span>
|
||||
</button>
|
||||
{% } %}</td>
|
||||
{% } else { %}
|
||||
<td colspan="2"></td>
|
||||
{% } %}
|
||||
<td class="cancel">{% if (!i) { %}
|
||||
<button class="btn btn-warning">
|
||||
<i class="icon-ban-circle icon-white"></i>
|
||||
<span>{%=locale.fileupload.cancel%}</span>
|
||||
</button>
|
||||
{% } %}</td>
|
||||
</tr>
|
||||
{% } %}
|
||||
</script>
|
||||
|
||||
<script id="template-download" type="text/x-tmpl">
|
||||
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
||||
<tr class="template-download fade">
|
||||
{% if (file.error) { %}
|
||||
<td>{%=file.title%}</td>
|
||||
<td class="name">{%=file.name%}</td>
|
||||
<td class="size">{%=o.formatFileSize(file.size)%}</td>
|
||||
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
|
||||
{% } else { %}
|
||||
<td class="preview">{% if (file.thumbnail_url) { %}
|
||||
<a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
|
||||
{% } %}</td>
|
||||
<td class="name">
|
||||
<a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a>
|
||||
</td>
|
||||
<td>{%=file.title%}</td>
|
||||
<td class="size">{%=o.formatFileSize(file.size)%}</td>
|
||||
<td>{%=file.public%}</td>
|
||||
<td colspan="2"></td>
|
||||
{% } %}
|
||||
<td class="delete">
|
||||
<button class="btn btn-danger pull-right" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}">
|
||||
<i class="icon-trash icon-white"></i>
|
||||
<span>{%=locale.fileupload.destroy%}</span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% } %}
|
||||
</script>
|
||||
2
app/views/proposal/edit.html.haml
Normal file
2
app/views/proposal/edit.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.container
|
||||
= render 'form'
|
||||
18
app/views/proposal/index.html.haml
Normal file
18
app/views/proposal/index.html.haml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
.container-fluid
|
||||
.row-fluid
|
||||
.span13
|
||||
%h2.pull-left
|
||||
My Proposals
|
||||
.pull-right{:style=>"margin-top:20px;"}
|
||||
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-primary"
|
||||
- @events.each do |event|
|
||||
.row-fluid
|
||||
.span12
|
||||
.well
|
||||
.row-fluid
|
||||
.span10
|
||||
= event.title
|
||||
.pull-right
|
||||
= link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary"
|
||||
= link_to "Withdraw", conference_proposal_path(@conference.short_title, event.id), :method => :delete,
|
||||
:confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger"
|
||||
2
app/views/proposal/new.html.haml
Normal file
2
app/views/proposal/new.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.container
|
||||
= render 'form'
|
||||
10
app/views/shared/_dynamic_association.html.haml
Normal file
10
app/views/shared/_dynamic_association.html.haml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
= f.inputs title do
|
||||
- if hint
|
||||
%p.inline-hint= hint
|
||||
%div{:class => association_name.to_s}
|
||||
= f.semantic_fields_for association_name do |association_form|
|
||||
= render association_name.to_s.singularize + "_fields", :f => association_form
|
||||
.links
|
||||
= add_association_link association_name, f, association_name
|
||||
%br
|
||||
%br
|
||||
Loading…
Add table
Add a link
Reference in a new issue