updated rails to 4.2.4
This commit is contained in:
parent
37697517df
commit
42e8bb11ea
55 changed files with 766 additions and 365 deletions
12
app/views/admin/comments/_all_comments.html.haml
Normal file
12
app/views/admin/comments/_all_comments.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
- @comments.each do |conference, events|
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.title.panel-title= conference.title
|
||||
.panel-body
|
||||
- events.each do |event, comments|
|
||||
.notifications
|
||||
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
|
||||
%hr
|
||||
- comments.each do |comment|
|
||||
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
||||
%p= comment.body
|
||||
12
app/views/admin/comments/_posted_comments.html.haml
Normal file
12
app/views/admin/comments/_posted_comments.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
- @posted_comments.each do |conference, events|
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.title.panel-title= conference.title
|
||||
.panel-body
|
||||
- events.each do |event, comments|
|
||||
.notifications
|
||||
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
|
||||
%hr
|
||||
- comments.each do |comment|
|
||||
%h5.strong Created at: #{comment.created_at}
|
||||
%p= comment.body
|
||||
12
app/views/admin/comments/_unread_comments.html.haml
Normal file
12
app/views/admin/comments/_unread_comments.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
- @unread_comments.each do |conference, events|
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.title.panel-title= conference.title
|
||||
.panel-body
|
||||
- events.each do |event, comments|
|
||||
.notifications
|
||||
%h4.title= link_to event.title, admin_conference_event_path(event.conference.short_title, event)
|
||||
%hr
|
||||
- comments.each do |comment|
|
||||
%h5.strong Posted by: #{comment.user.name} | Created at: #{comment.created_at}
|
||||
%p= comment.body
|
||||
24
app/views/admin/comments/index.html.haml
Normal file
24
app/views/admin/comments/index.html.haml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
%h1 Comments
|
||||
%br
|
||||
.row
|
||||
.col-md-12
|
||||
%ul.nav.nav-tabs#commentsTable
|
||||
%li.active
|
||||
%a{:href=>"#unread_comments", "data-toggle"=>"tab"}
|
||||
%span.fa.fa-comment
|
||||
Unread
|
||||
%li
|
||||
%a{:href=>"#posted_comments", "data-toggle"=>"tab"}
|
||||
%span.fa.fa-pencil
|
||||
Posted
|
||||
%li
|
||||
%a{:href=>"#all_comments", "data-toggle"=>"tab"}
|
||||
%span.fa.fa-comments-o
|
||||
All
|
||||
.tab-content
|
||||
.tab-pane.active#unread_comments
|
||||
= render partial: 'unread_comments'
|
||||
.tab-pane#posted_comments
|
||||
= render partial: 'posted_comments'
|
||||
.tab-pane#all_comments
|
||||
= render partial: 'all_comments'
|
||||
10
app/views/admin/emails/comment_template.text.erb
Normal file
10
app/views/admin/emails/comment_template.text.erb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Dear <%= @user.name %>,
|
||||
|
||||
User <%= @comment.user.name %> posted a new comment for event <%= @event.title %> of <%= @conference.short_title %> .
|
||||
|
||||
"<%= @comment.body %>"
|
||||
|
||||
To reply to this comment, please go to <%= h( admin_conference_event_url(@conference.short_title, @event)) %>
|
||||
|
||||
Best wishes,
|
||||
<%= @conference.short_title %> Team
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
%table.table.table-hover#event_types
|
||||
%thead
|
||||
%th Title
|
||||
%th Description
|
||||
%th Length
|
||||
%th Abstract Length
|
||||
%th Color
|
||||
|
|
@ -18,6 +19,8 @@
|
|||
%tr
|
||||
%td
|
||||
= event_type.title
|
||||
%td
|
||||
= event_type.description
|
||||
%td
|
||||
= event_type.length
|
||||
Minutes
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@
|
|||
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
|
||||
- else
|
||||
= label_tag "label_rating", "", :class => "avgrating"
|
||||
%br
|
||||
- voted = event.voted?(event, current_user)
|
||||
- if voted
|
||||
%span.label.label-success
|
||||
Your rating: #{voted.rating}
|
||||
- else
|
||||
%span.label.label-danger
|
||||
Not rated
|
||||
- else
|
||||
0/#{@conference.call_for_paper.rating}
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
= q.title
|
||||
|
||||
%b A:
|
||||
- registration.qanswers.where(:question_id => q.id).each do |qa|
|
||||
- registration.qanswers.where(question_id: q.id).each do |qa|
|
||||
= qa.answer.title
|
||||
%br
|
||||
%br
|
||||
|
|
|
|||
|
|
@ -2,25 +2,17 @@
|
|||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
Edit registration of #{@user.username} for #{@conference.short_title}
|
||||
Registration for #{@user.username}
|
||||
.row
|
||||
.col-md-8
|
||||
= semantic_form_for(@registration, :url => admin_conference_registration_path(@conference.short_title, @registration)) do |f|
|
||||
.col-md-6
|
||||
= semantic_form_for(@registration, url: admin_conference_registration_path(@conference.short_title, @registration)) do |f|
|
||||
= f.inputs 'Personal Information' do
|
||||
= f.fields_for :user do |u|
|
||||
= u.input :name, as: :string
|
||||
= u.input :nickname, as: :string
|
||||
= u.input :affiliation, placeholder: 'Company/User Group/nothing', as: :string
|
||||
= f.inputs 'Registration Information' do
|
||||
- @conference.questions.each do |q|
|
||||
%h5
|
||||
= "Q: #{q.title}"
|
||||
- if q.question_type.id == 1 || q.question_type.id == 2 # yes/no or single choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :select, :input_html => { :multiple => false }, :label => false, :include_blank => "Please make your choice",
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
- if q.question_type.id == 3 # multiple choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :check_boxes, :label => false,
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
= render partial: 'conference_registrations/registration_info', locals: { f: f }
|
||||
|
||||
-# Not necessary
|
||||
- if @conference.social_events.count > 0
|
||||
|
|
@ -28,4 +20,4 @@
|
|||
%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' }
|
||||
= f.action :submit, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
= "(#{@registrations.length})" if @registrations
|
||||
.btn-group.pull-right
|
||||
- if can? :read, Registration
|
||||
= 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"
|
||||
= link_to 'Export PDF', admin_conference_registrations_path(@conference.short_title, format: :pdf), class: 'btn btn-success'
|
||||
= link_to 'Export XLS', {format: :xlsx}, class: 'btn btn-success'
|
||||
%p.text-muted
|
||||
All the people who registered to your event
|
||||
%table.table.table-hover.datatable#registrations
|
||||
|
|
@ -32,12 +32,12 @@
|
|||
= registration.email
|
||||
%td
|
||||
- if registration.arrival
|
||||
= registration.arrival.strftime("%d %b %H:%M")
|
||||
= registration.arrival.strftime('%d %b %H:%M')
|
||||
- else
|
||||
n/a
|
||||
%td
|
||||
- if registration.departure
|
||||
= registration.departure.strftime("%d %b %H:%M")
|
||||
= registration.departure.strftime('%d %b %H:%M')
|
||||
- else
|
||||
n/a
|
||||
-if @conference.questions.any?
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
= check_box_tag "#{@conference.short_title}_#{registration.id}", registration.id, registration.attended,
|
||||
class: 'switch-checkbox', method: :patch,
|
||||
url: toggle_attendance_admin_conference_registration_path(@conference.short_title, id: registration.id)+"?attended=",
|
||||
data: { size: "small",
|
||||
data: { size: 'small',
|
||||
on_color: 'success',
|
||||
off_color: 'warning',
|
||||
on_text: 'Present',
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
.questions{class: "question#{index}", style: 'display:none;'}
|
||||
= render partial: 'questions', locals: { registration: registration }
|
||||
|
||||
.modal.fade{ id: "questions", 'role' => 'dialog', 'aria-hidden' => 'true' }
|
||||
.modal.fade{ id: 'questions', 'role' => 'dialog', 'aria-hidden' => 'true' }
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue