Skip to content

Commit 86b19ed

Browse files
committed
Merge remote-tracking branch 'origin/main' into next
2 parents 01975ad + 479a3c1 commit 86b19ed

24 files changed

+8681
-1875
lines changed

app/views/projects/show.api.rsb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ api.project do
1414
api.geojson ""
1515
end
1616

17-
if @project.gtt_tile_sources.present?
18-
api.gttLayer @project.gtt_tile_sources
19-
end
20-
2117
render_api_custom_values @project.visible_custom_field_values, api
2218
render_api_includes(@project, api)
2319

app/views/projects/show/_map.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% if @project.nil? or @project.module_enabled?(:gtt) %>
22
<div class="usermap box">
3-
<h3><%= l(:label_project_map) %></h3>
3+
<h3 class="icon icon-gtt-map"><%= l(:label_project_map) %></h3>
44

55
<%= map_tag map: @project.map %>
66
</div>

app/views/settings/gtt/_settings.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<%= text_area_tag('settings[default_geocoder_options]',
9898
@settings['default_geocoder_options'],
9999
:escape => false,
100-
:rows => 30,
100+
:rows => 10,
101101
:cols => 100) %>
102102
</p>
103103
</div>

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
menu :admin_menu,
4141
:gtt_tile_sources,
4242
{ controller: 'gtt_tile_sources', action: 'index' },
43-
caption: :label_gtt_tile_source_plural, :html => {:class => 'icon'}
43+
caption: :label_gtt_tile_source_plural, :html => {:class => 'icon icon-gtt-map'}
4444
end
4545

4646
# Register MIME Types

lib/redmine_gtt/patches/projects_helper_patch.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@ module Patches
88
module ProjectsHelperPatch
99

1010
def self.apply
11+
ProjectsHelper.prepend self unless ProjectsHelper < self
1112
ProjectsController.class_eval do
1213
helper SettingsMenuItem
1314
end
1415
end
1516

17+
def render_api_includes(project, api)
18+
super
19+
api.array :layers do
20+
project.gtt_tile_sources.each do |gtt_tile_source|
21+
api.layer(gtt_tile_source.attributes)
22+
end
23+
end if include_in_api_response?('layers')
24+
end
25+
1626
module SettingsMenuItem
1727
def project_settings_tabs
1828
super.tap do |tabs|

0 commit comments

Comments
 (0)