diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index b3bf053c2..7032f0395 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -16,7 +16,11 @@ def show @tag = Tag.find_by_name params[:id] @maps = @tag.maps.paginate(page: params[:page], per_page: 24) @title = "Maps tagged with ' #{@tag.name} '" - render template: 'maps/index' + tag = Tag.where(name: 'featured').first # note that this is not a join table but the .maps method still works + @unpaginated = true + @authors = User.where(login: tag.maps.collect(&:author)) if tag + @authors ||= [] + render template: 'tags/index' end def destroy diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb new file mode 100644 index 000000000..88ca2b3d0 --- /dev/null +++ b/app/views/tags/index.html.erb @@ -0,0 +1,111 @@ +<%= stylesheet_link_tag "/lib/leaflet/dist/leaflet.css" %> +<%= stylesheet_link_tag "/lib/leaflet-environmental-layers/dist/LeafletEnvironmentalLayers.css" %> +<%= javascript_include_tag('/lib/leaflet-environmental-layers/dist/LeafletEnvironmentalLayers.js') %> +<%= javascript_include_tag('/lib/leaflet-environmental-layers/dist/windRoseLayer.js') %> +<%= javascript_include_tag('/lib/leaflet-fullhash/leaflet-fullHash.js') %> +<%= javascript_include_tag('https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js') %> +<%= stylesheet_link_tag "https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css" %> + +<%= javascript_include_tag('/lib/leaflet-spin/example/spin/dist/spin.min.js') %> +<%= javascript_include_tag('/lib/leaflet-spin/example/leaflet.spin.min.js') %> + +