diff --git a/app/assets/stylesheets/management/application.scss b/app/assets/stylesheets/management/application.scss index a102dcc..e182a43 100644 --- a/app/assets/stylesheets/management/application.scss +++ b/app/assets/stylesheets/management/application.scss @@ -14,3 +14,9 @@ @import "forms"; @import "record_tables"; @import "dashboard"; + +.heading-actions { + & > div { + display: inline-block; + } +} \ No newline at end of file diff --git a/app/views/management/events/_speaker.slim b/app/views/management/events/_speaker.slim new file mode 100644 index 0000000..32ef933 --- /dev/null +++ b/app/views/management/events/_speaker.slim @@ -0,0 +1,37 @@ +- personal_profile = speaker.personal_profile(@conference) || PersonalProfile.new +.row + .speaker-profile + .panel.panel-default + .panel-heading + h1.panel-title + = personal_profile.name + / = link_to icon(:edit), [:edit, :management, @conference, personal_profile], class: 'btn btn-xs btn-danger pull-right' + .panel-body + .center + = image_tag personal_profile.picture.medium.url, class: "profile-image" + - if personal_profile.organisation.present? + div + => icon :briefcase + = personal_profile.organisation + div.social + = link_to "mailto://#{speaker.email}" + = icon :envelope + - if personal_profile.github.present? + = link_to "https://github.com/#{personal_profile.github}" + = icon :github + - if personal_profile.twitter.present? + = link_to "https://twitter.com/#{personal_profile.twitter}" + = icon :twitter + + hr + + h4 = PersonalProfile.human_attribute_name(:biography) + = simple_format personal_profile.biography + + h4 = t :contacts + - if personal_profile.twitter.present? + p #{icon :twitter} @#{personal_profile.twitter} + - if personal_profile.public_email.present? + p #{icon :envelope} #{personal_profile.public_email} (#{t(:public)}) + p #{icon :envelope} #{speaker.email} (#{t(:private)}) + / p #{glyph :phone} #{Phony.format(personal_profile.mobile_phone, format: :international)} diff --git a/app/views/management/events/show.html.slim b/app/views/management/events/show.html.slim index b94172c..36e77a5 100644 --- a/app/views/management/events/show.html.slim +++ b/app/views/management/events/show.html.slim @@ -1,26 +1,46 @@ +.row + h1.page-header + = @event.title + small< + = @event.subtitle + 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 + 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< + ul.dropdown-menu + - Proposition.statuses.each do |(status, _)| + - next if status == @event.status + li + = link_to [:management, @conference, @event.proposition, proposition: {status: status}], method: :patch do + = proposition_status_icon(status) + =< t "status.#{status}" + div.btn-group.btn-group-sm + = action_buttons(@conference, @event, [:index, :edit]) + + + h3 = Event.human_attribute_name :abstract + p = simple_format @event.abstract + + h3 = Event.human_attribute_name :description + p = simple_format @event.description + - if @event.notes.present? + h3 = Event.human_attribute_name :notes + p = simple_format @event.notes .row .col-lg-12 .panel.panel-default .panel-heading - h2= @event.title - br - h3= @event.subtitle + h2 + = @event.title + small< + = @event.subtitle - h4 #{Event.human_attribute_name :length}: #{@event.length}m, #{Event.human_attribute_name :language}: #{@event.language} - - .panel-body - h3= Event.human_attribute_name :abstract - p= simple_format @event.abstract - - h3= Event.human_attribute_name :description - p= simple_format @event.description - - h3= Event.human_attribute_name :notes - p= simple_format @event.notes - - h3= Event.human_attribute_name :user - p= link_to @event.proposer_profile.name, [:management, @conference, @event.proposer] + = Event.human_attribute_name :user + = render partial: 'speaker', collection: @event.participants .panel-footer div.btn-group.btn-group-sm - = action_buttons(@conference, @event, [:index, :edit, :destroy]) + = action_buttons(@conference, @event, [:index, :edit]) diff --git a/config/locales/management.bg.yml b/config/locales/management.bg.yml index d398863..d91b381 100644 --- a/config/locales/management.bg.yml +++ b/config/locales/management.bg.yml @@ -7,4 +7,6 @@ bg: undecided: Неопределен approved: Одобрен rejected: Отхвърлен - backup: Резерва \ No newline at end of file + backup: Резерва + events: + metadata: "%{type} на %{language} с продължителност %{length} минути" \ No newline at end of file