Minor tweaks to events

This commit is contained in:
Petko Bordjukov 2016-10-08 22:56:03 +03:00
parent e9995cbc0b
commit a19efc6c50
3 changed files with 4 additions and 9 deletions

View File

@ -27,12 +27,6 @@ module ApplicationHelper
icon(proposition_status_glyph(status))
end
def proposition_status(record)
klass = record.class
output = ''
end
def action_buttons(conference, record, actions = [:index, :show, :edit, :destroy])
klass = record.class
output = ''
@ -54,7 +48,7 @@ module ApplicationHelper
if actions.include? :edit
output += link_to(icon(:edit), [:edit, :management, conference, record], {
title: t('actions.edit.button', model: klass.model_name.human),
class: 'btn btn-primary'
class: 'btn btn-warning'
})
end

View File

@ -3,7 +3,8 @@ module EventsHelper
event.participants.map do |participant|
if participant.personal_profile(event.conference).present?
profile = participant.personal_profile(event.conference)
link_to icon(:user, profile.name), management_conference_personal_profile_path(profile, conference_id: event.conference.id)
link_to icon(:user, profile.name),
management_conference_personal_profile_path(profile, conference_id: event.conference.id)
else
link_to icon('user-plus', participant.email),
new_management_conference_personal_profile_path(conference_id: event.conference.id,

View File

@ -6,7 +6,7 @@
h4
= t 'events.metadata', type: @event.event_type.name, language: t("locales.#{@event.language}").mb_chars.downcase, length: @event.length
.pull-right.heading-actions
.dropdown
.dropdown>
button class="btn btn-sm dropdown-toggle btn-#{proposition_status_class(@event.status)}" type="button" data-toggle="dropdown" title="#{t "status.#{@event.status}"}"
= icon(proposition_status_glyph(@event.status))
span.caret<