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

View File

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

View File

@ -6,7 +6,7 @@
h4 h4
= t 'events.metadata', type: @event.event_type.name, language: t("locales.#{@event.language}").mb_chars.downcase, length: @event.length = t 'events.metadata', type: @event.event_type.name, language: t("locales.#{@event.language}").mb_chars.downcase, length: @event.length
.pull-right.heading-actions .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}"}" 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)) = icon(proposition_status_glyph(@event.status))
span.caret< span.caret<