Skip to content

Commit 070f0b5

Browse files
committed
Refactor settings views to remove unnecessary divs and improve layout with horizontal rules
1 parent 15c0439 commit 070f0b5

File tree

5 files changed

+21
-24
lines changed

5 files changed

+21
-24
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div class="box tabular settings">
21
<h3><%= l(:select_default_map_settings) %></h3>
32

43
<p>
@@ -41,9 +40,8 @@
4140
:size => 10) %>
4241
</p>
4342

44-
</div>
43+
<hr>
4544

46-
<div class="box tabular settings">
4745
<h3><%= l(:select_edit_geometry_settings) %></h3>
4846

4947
<p>
@@ -62,9 +60,9 @@
6260
<%= content_tag(:label, l(:label_enable_geojson_upload_on_issue_map)) %>
6361
<%= check_box_tag 'settings[enable_geojson_upload_on_issue_map]', true, @settings[:enable_geojson_upload_on_issue_map] %>
6462
</p>
65-
</div>
6663

67-
<div class="box tabular settings">
64+
<hr>
65+
6866
<h3><%= l(:select_other_gtt_settings) %></h3>
6967

7068
<p>
@@ -81,4 +79,3 @@
8179
<%= content_tag(:label, l(:label_hide_map_for_invalid_geom)) %>
8280
<%= check_box_tag 'settings[hide_map_for_invalid_geom]', 1, Setting.plugin_redmine_gtt['hide_map_for_invalid_geom'] %>
8381
</p>
84-
</div>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div class="box tabular settings">
21
<h3><%= l(:select_default_geocoder_settings) %></h3>
32

43
<p>
@@ -27,7 +26,6 @@
2726
:rows => 10,
2827
:cols => 100) %>
2928
</p>
30-
</div>
3129

3230
<script>
3331
document.getElementById('geocoder_load_example').addEventListener('click', (event) => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
});
3333

3434
// Apply settings
35-
window.gtt_setting()
35+
window.gtt_setting();
3636
<% end %>
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
<div class="box tabular settings">
21
<h3><%= l(:select_default_tracker_icon) %></h3>
32

43
<% Tracker.sorted.each do |t| %>
5-
<p>
6-
<%= content_tag :label, t.name %>
7-
<%= select_tag "settings[tracker_#{t.id}]", "<option>#{@settings["tracker_#{t.id}"]}</option>".html_safe %>
8-
<i id="icon_settings_tracker_<%= t.id %>"></i>
9-
</p>
4+
<p>
5+
<%= content_tag :label, t.name %>
6+
<%= select_tag "settings[tracker_#{t.id}]", "<option>#{@settings["tracker_#{t.id}"]}</option>".html_safe %>
7+
<i id="icon_settings_tracker_<%= t.id %>"></i>
8+
</p>
109
<% end %>
11-
</div>
1210

13-
<div class="box tabular settings">
11+
<hr>
12+
1413
<h3><%= l(:select_default_status_color) %></h3>
1514

1615
<% IssueStatus.sorted.each do |t| %>
17-
<p>
18-
<%= content_tag :label, t.name %>
19-
<%= color_field_tag "settings[status_#{t.id}]", @settings["status_#{t.id}"] %>
20-
</p>
16+
<p>
17+
<%= content_tag :label, t.name %>
18+
<%= color_field_tag "settings[status_#{t.id}]", @settings["status_#{t.id}"] %>
19+
</p>
2120
<% end %>
22-
</div>
2321

24-
<div class="box tabular settings">
22+
<hr>
23+
24+
<h3><%= l(:select_other_style_settings) %></h3>
25+
2526
<p>
2627
<%= content_tag(:label, l(:gtt_settings_vector_minzoom_level)) %>
2728
<%= text_field_tag('settings[vector_minzoom_level]',
2829
@settings['vector_minzoom_level'],
2930
:size => 10 ) %>
3031
</p>
31-
</div>

config/locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ en:
6969
select_edit_geometry_settings: "Set edit geometry settings:"
7070
select_default_geocoder_settings: "Set Geocoder settings:"
7171

72+
select_other_style_settings: "Other style settings"
73+
7274
project_module_gtt: "GTT"
7375
permission_manage_gtt_settings: "Manage GTT settings"
7476
permission_view_gtt_settings: "View GTT settings"

0 commit comments

Comments
 (0)