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
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@search = Orga.search params[:q]
|
|
||||||
|
|
||||||
@events_future = Event.moderated.future.tag @orga.name_as_tag
|
@events_future = Event.moderated.future.tag @orga.name_as_tag
|
||||||
@events_past = Event.moderated.past.tag @orga.name_as_tag
|
@events_past = Event.moderated.past.tag @orga.name_as_tag
|
||||||
end
|
end
|
||||||
|
@ -9,14 +9,13 @@
|
|||||||
%tr
|
%tr
|
||||||
%th= link_to t(:all,
|
%th= link_to t(:all,
|
||||||
scope: 'activerecord.attributes.region.name_values'), root_path
|
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,
|
%th= link_to :webcal,
|
||||||
events_path(protocol: :webcal, format: :ics, region: :all,
|
events_path(protocol: :webcal, format: :ics, only_path: false)
|
||||||
only_path: false)
|
|
||||||
%th= link_to :iCal,
|
%th= link_to :iCal,
|
||||||
events_path(format: :ics, region: :all, only_path: false)
|
events_path(format: :ics, only_path: false)
|
||||||
%th= link_to :GeoJSON,
|
%th= link_to :GeoJSON,
|
||||||
maps_path(format: :json, region: :all, only_path: false)
|
maps_path(format: :json, only_path: false)
|
||||||
|
|
||||||
%tbody
|
%tbody
|
||||||
- @regions.find_each do |region|
|
- @regions.find_each do |region|
|
||||||
|
@ -3,7 +3,7 @@ Differ.format = Differ::Format::Patch
|
|||||||
|
|
||||||
def gen_title
|
def gen_title
|
||||||
t 'layouts.application.title' +
|
t 'layouts.application.title' +
|
||||||
if params[:region].present? && params[:region] != 'all'
|
if params[:region].present?
|
||||||
region = Region.find(params[:region]).name
|
region = Region.find(params[:region]).name
|
||||||
" [#{region}]"
|
" [#{region}]"
|
||||||
else
|
else
|
||||||
|
@ -47,6 +47,7 @@ class OrgasControllerTest < ActionController::TestCase
|
|||||||
kind_id: @orga.kind_id,
|
kind_id: @orga.kind_id,
|
||||||
name: @orga.name,
|
name: @orga.name,
|
||||||
region_id: @orga.region.id,
|
region_id: @orga.region.id,
|
||||||
|
description: @orga.description,
|
||||||
url: @orga.url
|
url: @orga.url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user