Browse Source

Removed empty conference type lists on conference list page

development
Godwin 8 years ago
parent
commit
6d23bb784c
  1. 41
      app/views/conferences/list.html.haml

41
app/views/conferences/list.html.haml

@ -18,23 +18,24 @@
= row do = row do
= columns(medium: 12, id: :conferences, class: 'list-view') do = columns(medium: 12, id: :conferences, class: 'list-view') do
- @conference_list.each do | type, list | - @conference_list.each do | type, list |
%h3=_"articles.conferences.headings.types.#{type.to_s}", :t - if list.present?
%ul %h3=_"articles.conferences.headings.types.#{type.to_s}", :t
- list.each do | conference | %ul
%li.conference{id: "conference-#{conference.id}", data: {a: conference.city.latitude, o: conference.city.longitude, y: conference.year, t: conference.conferencetype}, class: conference.is_public ? nil : 'not-public'} - list.each do | conference |
.info %li.conference{id: "conference-#{conference.id}", data: {a: conference.city.latitude, o: conference.city.longitude, y: conference.year, t: conference.conferencetype}, class: conference.is_public ? nil : 'not-public'}
%h4.title= conference.title .info
.conference-details %h4.title= conference.title
.location=location(conference.city) .conference-details
- if conference.start_date.present? && conference.end_date.present? .location=location(conference.city)
.date= date_span(conference.start_date.to_date, conference.end_date.to_date) - if conference.start_date.present? && conference.end_date.present?
.actions .date= date_span(conference.start_date.to_date, conference.end_date.to_date)
= link_to (_'articles.workshops.info.read_more'), conference_path(conference.slug), class: ['button', 'conference-link', 'small'] .actions
- if logged_in? = link_to (_'articles.workshops.info.read_more'), conference_path(conference.slug), class: ['button', 'conference-link', 'small']
- if conference.host? current_user - if logged_in?
= link_to (_'forms.actions.generic.administrate'), administrate_conference_path(conference.slug), class: [:button, :modify, :small] - if conference.host? current_user
- if current_user.administrator? = link_to (_'forms.actions.generic.administrate'), administrate_conference_path(conference.slug), class: [:button, :modify, :small]
= link_to (_'forms.actions.generic.edit'), edit_conference_path(conference.slug), class: [:button, :subdued, :small] - if current_user.administrator?
- if conference.poster.present? = link_to (_'forms.actions.generic.edit'), edit_conference_path(conference.slug), class: [:button, :subdued, :small]
.img - if conference.poster.present?
%img{src: conference.poster.preview.url} .img
%img{src: conference.poster.preview.url}

Loading…
Cancel
Save