mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Speaker is displayed instead of submitter un public pages
This commit is contained in:
parent
3a2bf49f97
commit
cb76a9b7cc
4 changed files with 12 additions and 9 deletions
|
|
@ -138,6 +138,7 @@ class ProposalController < ApplicationController
|
|||
|
||||
def show
|
||||
@event = Event.find(params[:id])
|
||||
@speaker = @event.speakers.first || @event.submitter
|
||||
end
|
||||
|
||||
def confirm
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class Event < ActiveRecord::Base
|
|||
has_many :event_people, :dependent => :destroy
|
||||
has_many :event_attachments, :dependent => :destroy
|
||||
has_many :people, :through => :event_people
|
||||
has_many :speakers, :through => :event_people, :source => :person, :conditions => {"event_people.event_role" => "speaker"}
|
||||
belongs_to :event_type
|
||||
|
||||
belongs_to :track
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@
|
|||
.span8
|
||||
%h3
|
||||
by
|
||||
= @event.submitter.public_name
|
||||
- if @event.submitter.company
|
||||
= @speaker.public_name
|
||||
- if @speaker.company
|
||||
%br
|
||||
%span.muted
|
||||
from
|
||||
= @event.submitter.company
|
||||
-if @event.submitter.biography
|
||||
= simple_format(@event.submitter.biography)
|
||||
= @speaker.company
|
||||
-if @speaker.biography
|
||||
= simple_format(@speaker.biography)
|
||||
.span4
|
||||
= image_tag @event.submitter.gravatar_url(:size => 200), :class => "img-rounded pull-right", :style => "margin: 8px;"
|
||||
= image_tag @speaker.gravatar_url(:size => 200), :class => "img-rounded pull-right", :style => "margin: 8px;"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,14 +44,15 @@
|
|||
class="event" role="button"
|
||||
data-href="<%= url_for(conference_proposal_path(@conference.short_title, event[0].id)) %>">
|
||||
<h5>
|
||||
<%= image_tag event[0].submitter.gravatar_url, :class => "img-circle pull-right", :alt => event[0].submitter.public_name, :title => event[0].submitter.public_name, :style => "padding:8px;" %>
|
||||
<%- speaker = event[0].speakers.first || event[0].submitter %>
|
||||
<%= image_tag speaker.gravatar_url, :class => "img-circle pull-right", :alt => speaker.public_name, :title => speaker.public_name, :style => "padding:8px;" %>
|
||||
<i class="icon-comment"></i>
|
||||
<%= event[0].title %><br>
|
||||
<% unless event[0].subtitle.empty? %>
|
||||
<span class="text-error"><%= event[0].subtitle %></span><br>
|
||||
<% end %>
|
||||
<i class="icon-user"></i>
|
||||
<%= event[0].submitter.public_name %>
|
||||
<%= speaker.public_name %>
|
||||
<% if event[0].track%>
|
||||
<br><i class="icon-road"></i>
|
||||
<span class="label" style="background-color:<%= event[0].track.color if event[0].track %>"><%= event[0].track.name %></span>
|
||||
|
|
@ -112,4 +113,4 @@ $(function() {
|
|||
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
|
||||
});
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue