Links to filter on region do not use the "all" value anymore
This commit is contained in:
parent
e2af7fbcb2
commit
1de8e3ef14
@ -38,8 +38,6 @@ class OrgasController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
@search = Orga.search params[:q]
|
||||
|
||||
@events_future = Event.moderated.future.tag @orga.name_as_tag
|
||||
@events_past = Event.moderated.past.tag @orga.name_as_tag
|
||||
end
|
||||
|
@ -9,14 +9,13 @@
|
||||
%tr
|
||||
%th= link_to t(:all,
|
||||
scope: 'activerecord.attributes.region.name_values'), root_path
|
||||
%th= link_to 'RSS', events_path(format: :rss, region: :all)
|
||||
%th= link_to 'RSS', events_path(format: :rss)
|
||||
%th= link_to :webcal,
|
||||
events_path(protocol: :webcal, format: :ics, region: :all,
|
||||
only_path: false)
|
||||
events_path(protocol: :webcal, format: :ics, only_path: false)
|
||||
%th= link_to :iCal,
|
||||
events_path(format: :ics, region: :all, only_path: false)
|
||||
events_path(format: :ics, only_path: false)
|
||||
%th= link_to :GeoJSON,
|
||||
maps_path(format: :json, region: :all, only_path: false)
|
||||
maps_path(format: :json, only_path: false)
|
||||
|
||||
%tbody
|
||||
- @regions.find_each do |region|
|
||||
|
@ -3,7 +3,7 @@ Differ.format = Differ::Format::Patch
|
||||
|
||||
def gen_title
|
||||
t 'layouts.application.title' +
|
||||
if params[:region].present? && params[:region] != 'all'
|
||||
if params[:region].present?
|
||||
region = Region.find(params[:region]).name
|
||||
" [#{region}]"
|
||||
else
|
||||
|
@ -47,6 +47,7 @@ class OrgasControllerTest < ActionController::TestCase
|
||||
kind_id: @orga.kind_id,
|
||||
name: @orga.name,
|
||||
region_id: @orga.region.id,
|
||||
description: @orga.description,
|
||||
url: @orga.url
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user