Bulk remove everything that needs to be reimplemented
This commit is contained in:
parent
cf489324c2
commit
01a30c3487
|
@ -1,8 +1,6 @@
|
|||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery_nested_form
|
||||
//= require dataTables/jquery.dataTables
|
||||
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
|
||||
//= require bootstrap-sprockets
|
||||
//= require raphael
|
||||
//= require morris
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
$ ->
|
||||
$('#side-menu').metisMenu();
|
||||
|
||||
$ ->
|
||||
$(window).bind "load resize", ->
|
||||
topOffset = 50
|
||||
width = if this.window.innerWidth > 0
|
||||
this.window.innerWidth
|
||||
else
|
||||
this.screen.width
|
||||
|
||||
if width < 768
|
||||
$('.collapsable').addClass 'collapse'
|
||||
topOffset = 100
|
||||
else
|
||||
$('.collapsable').removeClass 'collapse'
|
||||
|
||||
height = if this.window.innerHeight > 0 ?
|
||||
this.window.innerHeight
|
||||
else
|
||||
this.screen.height
|
||||
|
||||
height = height - topOffset
|
||||
|
||||
if height < 1
|
||||
height = 1
|
||||
|
||||
if height > topOffset
|
||||
$("#page-wrapper").css("min-height", (height) + "px")
|
|
@ -1,2 +0,0 @@
|
|||
$ ->
|
||||
$('[data-table]').dataTable();
|
|
@ -6,12 +6,9 @@
|
|||
@import "bootstrap";
|
||||
@import "bootswatch/simplex/bootswatch";
|
||||
|
||||
@import "dataTables/jquery.dataTables";
|
||||
@import "dataTables/bootstrap/3/jquery.dataTables.bootstrap";
|
||||
@import "morris";
|
||||
|
||||
@import "layout";
|
||||
@import "navigation";
|
||||
@import "forms";
|
||||
@import "record_tables";
|
||||
@import "dashboard";
|
|
@ -1,56 +1,9 @@
|
|||
module Management
|
||||
class EventsController < ManagementController
|
||||
before_action :assign_suggestion, only: [:show, :state]
|
||||
|
||||
def index
|
||||
@suggestion_groups = SuggestionGroup.for_conference Conference.current
|
||||
end
|
||||
|
||||
def approved
|
||||
@suggestion_groups = SuggestionGroup.for_conference Conference.current, state: Event.states[:approved]
|
||||
render :index
|
||||
end
|
||||
|
||||
def undecided
|
||||
@suggestion_groups = SuggestionGroup.for_conference Conference.current, state: Event.states[:undecided]
|
||||
render :index
|
||||
end
|
||||
|
||||
def rejected
|
||||
@suggestion_groups = SuggestionGroup.for_conference Conference.current, state: Event.states[:rejected]
|
||||
render :index
|
||||
end
|
||||
|
||||
def backup
|
||||
@suggestion_groups = SuggestionGroup.for_conference Conference.current, state: Event.states[:backup]
|
||||
render :index
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def state
|
||||
@suggestion.state = state_params
|
||||
@suggestion.save
|
||||
end
|
||||
|
||||
def send_acceptance_notifications
|
||||
@suggestions = Conference.current.events.approved.where acceptance_notification_sent_at: nil
|
||||
if @suggestions.all?(&:send_acceptance_notification!)
|
||||
head :no_content
|
||||
else
|
||||
head :unprocessable_entity
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def state_params
|
||||
params.require :state
|
||||
end
|
||||
|
||||
def assign_suggestion
|
||||
@suggestion = Event.find params[:id]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,10 +4,10 @@ tr
|
|||
td.hidden-xs.hidden-sm = l conference.end_date.to_date, format: :long
|
||||
td.action
|
||||
- if conference.call_for_papers_open?
|
||||
= link_to cfp_management_conference_path(conference), method: :delete, class: 'btn btn-sm btn-success cfp-toggle', remote: true, onclick: '$(".cfp-toggle").addClass("disabled")'
|
||||
= link_to '#', method: :delete, class: 'btn btn-sm btn-success cfp-toggle', remote: true, onclick: '$(".cfp-toggle").addClass("disabled")'
|
||||
= icon 'dot-circle-o', '', class: 'fa-fw'
|
||||
- else
|
||||
= link_to cfp_management_conference_path(conference), method: :post, class: 'btn btn-sm btn-warning cfp-toggle', remote: true, onclick: '$(".cfp-toggle").addClass("disabled")'
|
||||
= link_to '#', method: :post, class: 'btn btn-sm btn-warning cfp-toggle', remote: true, onclick: '$(".cfp-toggle").addClass("disabled")'
|
||||
= icon 'circle-o', class: 'fa-fw'
|
||||
|
||||
td = conference.events.count
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
= @conference.events.rejected.count
|
||||
div
|
||||
= t 'event_states.rejected', count: @conference.events.rejected.count
|
||||
= link_to rejected_management_conference_events_path(@conference)
|
||||
= link_to management_conference_events_path(@conference, status: :rejected)
|
||||
.panel-footer.text-danger
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = icon 'arrow-circle-right'
|
||||
|
@ -48,7 +48,7 @@
|
|||
= @conference.events.approved.count
|
||||
div
|
||||
= t 'event_states.approved', count: @conference.events.approved.count
|
||||
= link_to approved_management_conference_events_path(@conference)
|
||||
= link_to management_conference_events_path(@conference, status: :approved)
|
||||
.panel-footer.text-info
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = icon 'arrow-circle-right'
|
||||
|
@ -64,7 +64,7 @@
|
|||
= @conference.events.approved.confirmed.count
|
||||
div
|
||||
= t 'event_states.confirmed', count: @conference.events.approved.confirmed.count
|
||||
= link_to confirmed_management_conference_events_path(@conference)
|
||||
= link_to management_conference_events_path(@conference, status: :approved, confirmed: true)
|
||||
.panel-footer.text-success
|
||||
span.pull-left = t 'views.conference.see_details'
|
||||
span.pull-right = icon 'arrow-circle-right'
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
.btn-group id="suggestion-#{suggestion.id}-state"
|
||||
button class="btn dropdown-toggle btn-#{Event::STATE_TO_CLASS[suggestion.state.to_sym]}" type="button" title="#{suggestion.state}" data-toggle="dropdown"
|
||||
=> glyph Event::STATE_TO_GLYPH[suggestion.state.to_sym]
|
||||
span.caret
|
||||
ul.dropdown-menu role="menu"
|
||||
- Event.states.each do |state, number|
|
||||
- next if state == suggestion.state
|
||||
li
|
||||
= link_to glyph(Event::STATE_TO_GLYPH[state.to_sym]), state_management_event_path(suggestion, state: state), title: state, class: "btn text-#{Event::STATE_TO_CLASS[state.to_sym]}", remote: true, method: :patch
|
|
@ -1,54 +0,0 @@
|
|||
.model-details id="suggestion-#{@suggestion.id}-details" tabindex="-1" role="dialog" aria-hidden="true"
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
button type="button" class="close" data-dismiss="modal" aria-hidden="true"
|
||||
h4.modal-title
|
||||
= @suggestion.title
|
||||
small<
|
||||
= @suggestion.subtitle
|
||||
br
|
||||
= t :meta_data, language: @suggestion.language, track: @suggestion.track.name, length: @suggestion.length
|
||||
|
||||
.modal-body
|
||||
.center
|
||||
h4 = @suggestion.class.human_attribute_name(:user)
|
||||
- unless @suggestion.user.speaker_profile.present?
|
||||
div.picture-placeholder
|
||||
= glyph(:user)
|
||||
h3.media-heading
|
||||
= @suggestion.user.email
|
||||
|
||||
- else
|
||||
= image_tag @suggestion.user.speaker_profile.picture.medium.url, class: "profile-image"
|
||||
h3.media-heading
|
||||
= @suggestion.user.speaker_profile.name
|
||||
- if @suggestion.user.speaker_profile.organisation.present?
|
||||
div
|
||||
=> icon(:briefcase)
|
||||
= @suggestion.user.speaker_profile.organisation
|
||||
|
||||
div.social
|
||||
= link_to "mailto://#{@suggestion.user.email}"
|
||||
= icon :envelope
|
||||
- if @suggestion.user.speaker_profile.github.present?
|
||||
= link_to "https://github.com/#{@suggestion.user.speaker_profile.github}"
|
||||
= icon :github
|
||||
- if @suggestion.user.speaker_profile.twitter.present?
|
||||
= link_to "https://twitter.com/#{@suggestion.user.speaker_profile.twitter}"
|
||||
= icon :twitter
|
||||
|
||||
h4 = @suggestion.class.human_attribute_name(:abstract)
|
||||
= simple_format @suggestion.abstract
|
||||
|
||||
h4 = @suggestion.class.human_attribute_name(:description)
|
||||
= simple_format @suggestion.description
|
||||
|
||||
|
||||
- if @suggestion.notes.present?
|
||||
h4 = @suggestion.class.human_attribute_name(:notes)
|
||||
= simple_format @suggestion.notes
|
||||
|
||||
.modal-footer
|
||||
button type="button" class="btn btn-default" data-dismiss="modal"
|
||||
= t(:close)
|
|
@ -1,29 +0,0 @@
|
|||
- suggestion_group.suggestions.each_with_index do |suggestion, index|
|
||||
tr
|
||||
- if index == 0
|
||||
td.picture rowspan="#{suggestion_group.suggestions.count}"
|
||||
- if suggestion_group.speaker.speaker_profile.present?
|
||||
= link_to management_user_path(suggestion_group.speaker), remote: true
|
||||
= image_tag suggestion_group.speaker.speaker_profile.picture.thumb.url, class: 'img-thumbnail'
|
||||
br
|
||||
= suggestion_group.speaker.speaker_profile.name
|
||||
- else
|
||||
.picture-placeholder
|
||||
= glyph(:user)
|
||||
= suggestion_group.speaker.email
|
||||
|
||||
td
|
||||
span.title
|
||||
= link_to management_event_path(suggestion), title: t(:view), remote: true, class: "#{'text-success' if suggestion.confirmed?}"
|
||||
= suggestion.title
|
||||
br
|
||||
span.subtitle
|
||||
= suggestion.subtitle
|
||||
td = suggestion.language
|
||||
td = suggestion.track.name
|
||||
td = suggestion.class.model_name.human
|
||||
td.actions
|
||||
div
|
||||
= link_to management_event_path(suggestion), title: t(:view), remote: true
|
||||
= glyph(:share)
|
||||
= render partial: 'state', locals: {suggestion: suggestion}
|
|
@ -1,22 +1 @@
|
|||
.row
|
||||
.panel.panel-primary
|
||||
.panel-heading
|
||||
h3.panel-title
|
||||
= Event.model_name.human(count: 2)
|
||||
span.pull-right
|
||||
= t(:suggestion_and_speaker_count, suggestions: @suggestion_groups.map(&:suggestions).flatten.count, speakers: @suggestion_groups.count)
|
||||
table.record-table
|
||||
thead
|
||||
tr
|
||||
th.picture = Event.human_attribute_name(:user)
|
||||
th = Event.human_attribute_name(:title)
|
||||
th = Event.human_attribute_name(:language)
|
||||
th = Track.model_name.human
|
||||
th = Event.human_attribute_name(:type)
|
||||
th.actions
|
||||
tbody
|
||||
= render partial: 'suggestion_group', collection: @suggestion_groups
|
||||
.panel-footer
|
||||
.pull-right
|
||||
= link_to 'Изпрати нотификации на одобрените', send_acceptance_notifications_management_events_path, remote: true, method: :post, data: {confirm: 'Сигурни ли сте'}, class: %w{btn btn-danger}
|
||||
.clearfix
|
||||
p Hello
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
$('body').append('<%= j render 'suggestion_details' %>');
|
||||
$('#suggestion-<%= @suggestion.id %>-details').on('hidden.bs.modal', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
$('#suggestion-<%= @suggestion.id %>-details').modal('show');
|
|
@ -1 +0,0 @@
|
|||
$('#suggestion-<%= @suggestion.id %>-state').replaceWith('<%= j render partial: 'state', locals: {suggestion: @suggestion} %>');
|
|
@ -1,41 +0,0 @@
|
|||
.model-details id="about-user-#{@user.id}" tabindex="-1" role="dialog" aria-hidden="true"
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
button type="button" class="close" data-dismiss="modal" aria-hidden="true"
|
||||
h4.modal-title = t(:more_about_user, user: @user.speaker_profile.name)
|
||||
.modal-body
|
||||
.center
|
||||
= image_tag @user.speaker_profile.picture.medium.url, class: "profile-image"
|
||||
h3.media-heading
|
||||
= @user.speaker_profile.name
|
||||
- if @user.speaker_profile.organisation.present?
|
||||
div
|
||||
=> icon(:briefcase)
|
||||
= @user.speaker_profile.organisation
|
||||
div.social
|
||||
= link_to "mailto://#{@user.email}"
|
||||
= icon :envelope
|
||||
- if @user.speaker_profile.github.present?
|
||||
= link_to "https://github.com/#{@user.speaker_profile.github}"
|
||||
= icon :github
|
||||
- if @user.speaker_profile.twitter.present?
|
||||
= link_to "https://twitter.com/#{@user.speaker_profile.twitter}"
|
||||
= icon :twitter
|
||||
|
||||
hr
|
||||
|
||||
h5 = SpeakerProfile.human_attribute_name(:biography)
|
||||
= simple_format @user.speaker_profile.biography
|
||||
|
||||
h5 = t :contacts
|
||||
- if @user.speaker_profile.twitter.present?
|
||||
p #{icon(:twitter)} @#{@user.speaker_profile.twitter}
|
||||
- if @user.speaker_profile.public_email.present?
|
||||
p #{icon(:envelope)} #{@user.speaker_profile.public_email} (#{t(:public)})
|
||||
p #{icon(:envelope)} #{@user.email} (#{t(:private)})
|
||||
p #{glyph(:phone)} #{Phony.format(@user.speaker_profile.mobile_phone, format: :international)}
|
||||
|
||||
.modal-footer
|
||||
button type="button" class="btn btn-default" data-dismiss="modal"
|
||||
= t(:close)
|
|
@ -1,23 +0,0 @@
|
|||
tr id="user-#{user.id}"
|
||||
td.picture
|
||||
- if user.speaker_profile.present?
|
||||
= image_tag user.speaker_profile.picture.thumb.url, class: 'img-thumbnail'
|
||||
- else
|
||||
.picture-placeholder
|
||||
= glyph(:user)
|
||||
td = user.email
|
||||
td = user.speaker_profile.try(:first_name) or '-'
|
||||
td = user.speaker_profile.try(:last_name) or '-'
|
||||
td.admin
|
||||
- if user.admin?
|
||||
span.toggle
|
||||
= link_to glyph(:check), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'checked'
|
||||
- else
|
||||
span.toggle
|
||||
= link_to glyph(:unchecked), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'unchecked'
|
||||
td.actions
|
||||
div
|
||||
= link_to management_user_path(user), title: t(:view), remote: true, disabled: user.speaker_profile.blank?
|
||||
= glyph(:share)
|
||||
= link_to edit_management_user_path(user), title: t(:edit)
|
||||
= glyph(:edit)
|
|
@ -1,20 +0,0 @@
|
|||
- content_for :title
|
||||
= User.model_name.human(count: 2).mb_chars.capitalize
|
||||
|
||||
.row
|
||||
.col-lg-12
|
||||
.panel.panel-primary
|
||||
.panel-heading
|
||||
h3.panel-title = User.model_name.human(count: 2)
|
||||
.panel-body
|
||||
table.table.table-striped data-table="true"
|
||||
thead
|
||||
tr
|
||||
th.picture = SpeakerProfile.human_attribute_name(:picture)
|
||||
th = User.human_attribute_name(:email)
|
||||
th = SpeakerProfile.human_attribute_name(:first_name)
|
||||
th = SpeakerProfile.human_attribute_name(:last_name)
|
||||
th.admin = SpeakerProfile.human_attribute_name(:admin)
|
||||
th.actions
|
||||
tbody
|
||||
= render @users
|
|
@ -1,5 +0,0 @@
|
|||
$('body').append('<%= j render 'about_user' %>');
|
||||
$('#about-user-<%= @user.id %>').on('hidden.bs.modal', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
$('#about-user-<%= @user.id %>').modal('show');
|
|
@ -1 +0,0 @@
|
|||
$('#user-<%= @user.id %>').replaceWith('<%= j render @user %>');
|
|
@ -5,31 +5,11 @@ Rails.application.routes.draw do
|
|||
get '/', to: 'conferences#index'
|
||||
|
||||
resources :conferences do
|
||||
member do
|
||||
post 'cfp', to: 'conferences#open_call_for_papers'
|
||||
delete 'cfp', to: 'conferences#close_call_for_papers'
|
||||
end
|
||||
|
||||
resources :events do
|
||||
member do
|
||||
patch 'state'
|
||||
end
|
||||
|
||||
collection do
|
||||
get 'approved'
|
||||
get 'rejected'
|
||||
get 'undecided'
|
||||
get 'backup'
|
||||
get 'confirmed'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resources :users do
|
||||
member do
|
||||
post 'toggle_admin'
|
||||
end
|
||||
resources :events
|
||||
resources :volunteers
|
||||
resources :sponsorship_offers
|
||||
end
|
||||
resources :users
|
||||
end
|
||||
|
||||
root 'management/conferences#index'
|
||||
|
|
Loading…
Reference in New Issue