mirror of
https://github.com/openSUSE/osem.git
synced 2026-05-09 08:04:21 -04:00
Added nil checks for call for papers in event index
Changed first / lastname to name close #342 close #344
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
%b Description
|
||||
%td= simple_format(@event.description)
|
||||
|
||||
- if @conference.call_for_papers.rating > 0
|
||||
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0
|
||||
= render :partial => "voting"
|
||||
|
||||
- if @event.event_attachments.size > 0
|
||||
|
||||
@@ -40,8 +40,7 @@
|
||||
- unless rate.user_id == current_user.id
|
||||
%tr
|
||||
%td
|
||||
= rate.first_name
|
||||
= rate.last_name
|
||||
= rate.name
|
||||
%td
|
||||
- @conference.call_for_papers.rating.times do |counter|
|
||||
- voted = @event.voted?(@event, rate.user)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
%b ID
|
||||
%th
|
||||
%b Title
|
||||
- unless @conference.call_for_papers.blank? or !(@conference.call_for_papers.rating > 0)
|
||||
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0
|
||||
%th
|
||||
%b Rating
|
||||
%th
|
||||
@@ -35,7 +35,7 @@
|
||||
%td
|
||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||
|
||||
- if @conference.call_for_papers.rating != 0
|
||||
- if @conference.call_for_papers && @conference.call_for_papers.rating && @conference.call_for_papers.rating > 0
|
||||
%td{:style => "width:96px"}
|
||||
- if event.average_rating.to_f > 0
|
||||
#{event.average_rating}/#{@conference.call_for_papers.rating}
|
||||
@@ -52,7 +52,7 @@
|
||||
0/#{@conference.call_for_papers.rating}
|
||||
%br
|
||||
|
||||
- if event.submitter.registrations.count < 1
|
||||
- if event.submitter && event.submitter.registrations && event.submitter.registrations.count < 1
|
||||
- bgcolor="#F7819F"
|
||||
- else
|
||||
- bgcolor=""
|
||||
|
||||
Reference in New Issue
Block a user