Link added from organisation to its events
This commit is contained in:
parent
d574b1624a
commit
ce956fcd11
@ -5,11 +5,13 @@
|
||||
-# Whole year calendar
|
||||
- @events = @events.year params[:year]
|
||||
%header.calendar-header.year
|
||||
= link_to '<<', year: params[:year].to_i - 1, tag: params[:tag],
|
||||
region: params[:region]
|
||||
= link_to year: params[:year].to_i - 1, tag: params[:tag],
|
||||
region: params[:region] do
|
||||
%em.fa.fa-backward
|
||||
= params[:year]
|
||||
= link_to '>>', year: params[:year].to_i + 1, tag: params[:tag],
|
||||
region: params[:region]
|
||||
= link_to year: params[:year].to_i + 1, tag: params[:tag],
|
||||
region: params[:region] do
|
||||
%em.fa.fa-forward
|
||||
|
||||
- (1..12).each do |i|
|
||||
- params[:start_date] = "#{params[:year]}-#{i}-01"
|
||||
|
@ -19,6 +19,10 @@
|
||||
class: :back do
|
||||
%em.fa.fa-li.fa-arrow-left
|
||||
= Orga.model_name.human.pluralize
|
||||
%li
|
||||
= link_to tag_path @orga.name_as_tag do
|
||||
%em.fa.fa-li.fa-tag
|
||||
= Event.model_name.human.pluralize
|
||||
%li
|
||||
= link_to events_path tag: @orga.name_as_tag do
|
||||
%em.fa.fa-li.fa-calendar
|
||||
@ -118,8 +122,16 @@
|
||||
%dd= l @orga.updated_at.to_date, format: :long
|
||||
|
||||
- if @events_future && @events_future.any?
|
||||
%dt= t '.future'
|
||||
%dd= t '.count', count: @events_future.count
|
||||
%dt
|
||||
%em.fa.fa-forward
|
||||
= t '.future'
|
||||
%dd
|
||||
= link_to tag_path @orga.name_as_tag do
|
||||
= t '.count', count: @events_future.count
|
||||
- if @events_future && @events_past.any?
|
||||
%dt= t '.past'
|
||||
%dd= t '.count', count: @events_past.count
|
||||
%dt
|
||||
%em.fa.fa-backward
|
||||
= t '.past'
|
||||
%dd
|
||||
= link_to tag_path @orga.name_as_tag do
|
||||
= t '.count', count: @events_past.count
|
||||
|
@ -1,6 +1,6 @@
|
||||
%h2
|
||||
%em.fa.fa-tag
|
||||
%em= title params[:id]
|
||||
= title params[:id]
|
||||
|
||||
%aside
|
||||
%h1
|
||||
@ -35,7 +35,9 @@
|
||||
|
||||
- if @events_future.any? || @events_past.any?
|
||||
- if @events_future.any?
|
||||
%h3= raw t '.future'
|
||||
%h3
|
||||
%em.fa.fa-forward
|
||||
= t '.future'
|
||||
%ul.fa-ul
|
||||
- @events_future.order('start_time asc').each do |event|
|
||||
%li
|
||||
@ -49,7 +51,9 @@
|
||||
.date= display_date event
|
||||
|
||||
- if @events_past.any?
|
||||
%h3= raw t '.past'
|
||||
%h3
|
||||
%em.fa.fa-backward
|
||||
= t '.past'
|
||||
%ul.fa-ul
|
||||
- @events_past.order('start_time desc').each do |event|
|
||||
%li
|
||||
|
Loading…
Reference in New Issue
Block a user