add route for communities

This commit is contained in:
Adam Hoyle 2021-08-07 15:46:39 +01:00
parent cf54b68f84
commit d8d1ab1776
6 changed files with 12 additions and 1 deletions

View file

@ -7,7 +7,7 @@ class Ability
can [:relation, :relation_history, :way, :way_history, :node, :node_history,
:changeset, :note, :new_note, :query], :browse
can :search, :direction
can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id], :site
can [:index, :permalink, :edit, :help, :fixthemap, :offline, :export, :about, :communities, :preview, :copyright, :key, :id], :site
can [:finish, :embed], :export
can [:search, :search_latlon, :search_ca_postcode, :search_osm_nominatim,
:search_geonames, :search_osm_nominatim_reverse, :search_geonames_reverse], :geocoder

View file

@ -106,6 +106,10 @@ class SiteController < ApplicationController
@locale = params[:about_locale] || I18n.locale
end
def communities
@locale = I18n.locale
end
def export; end
def offline; end

View file

@ -59,6 +59,9 @@
<li class="compact-hide nav-item <%= current_page_class(about_path) %>">
<%= link_to t("layouts.about"), about_path, :class => "nav-link" %>
</li>
<li class="compact-hide nav-item <%= current_page_class(communities_path) %>">
<%= link_to t("layouts.communities"), communities_path, :class => "nav-link" %>
</li>
<li id="compact-secondary-nav" class="dropdown nav-item">
<a class="dropdown-toggle nav-link" data-toggle="dropdown" href="#"><%= t "layouts.more" %></a>
<ul class="dropdown-menu">
@ -75,6 +78,7 @@
<li class="<%= current_page_class(copyright_path) %>"><%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %></li>
<li class="<%= current_page_class(help_path) %>"><%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %></li>
<li class="<%= current_page_class(about_path) %>"><%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %></li>
<li class="<%= current_page_class(communities_path) %>"><%= link_to t("layouts.communities"), communities_path, :class => "dropdown-item" %></li>
</ul>
</li>
</ul>

View file

@ -0,0 +1 @@
COMMUNITIES PAGE WILL GO HERE 🎉