Skip to content

Commit 2268f47

Browse files
authored
Merge pull request #350 from DigitalCurationCentre/vyruss/bugfixes
Vyruss/bugfixes
2 parents 4225ca9 + 87b6a82 commit 2268f47

File tree

7 files changed

+44
-10
lines changed

7 files changed

+44
-10
lines changed

app/controllers/plans_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def update_guidance_choices
184184
end
185185
end
186186
@plan.save
187+
flash[:notice] = _('Guidance choices saved.')
187188
redirect_to action: "show"
188189
end
189190

app/models/org.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ class Org < ActiveRecord::Base
33
include FlagShihTzu
44
extend Dragonfly::Model::Validations
55

6+
##
7+
# Sort order: Name ASC
8+
default_scope { order(name: :asc) }
9+
10+
611
##
712
# Associations
813
# belongs_to :organisation_type # depricated, but cannot be removed until migration run

app/views/layouts/_signin_signout.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@
3737
<% end %>
3838
</ul>
3939
</div>
40+
<!-- Quick'n'dirty touchscreen hack for Bootstrap's buggy dropdown -->
41+
<style>
42+
.dropdown-backdrop{ position: static; }
43+
</style>

app/views/users/admin_grant_permissions.html.erb

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,36 @@
66

77
<div class="white_background">
88
<%= form_tag( admin_update_permissions_user_path(@user), method: :put) do %>
9-
<table id="dmp_table" class="dmp_table tablesorter">
9+
<table id="dmp_table" class="dmp_table">
1010
<thead>
1111
<tr>
1212
<% @perms.each do |perm| %>
13-
<th class="dmp_th_medium"> <%= perm.name %> </th>
13+
<% case perm.name when 'grant_permissions' %>
14+
<th class="dmp_th_medium" title="
15+
<%= _('Allows the user to assign permissions to other users within the same organisation. Users can only assign permissions they own themselves') %>">
16+
<%= _('Grant permissions') %>
17+
</th>
18+
<% when 'modify_templates' %>
19+
<th class="dmp_th_medium" title="
20+
<%= _('Allows the user to create new institutional templates, edit existing ones and customise funder templates') %>">
21+
<%= _('Modify templates') %>
22+
</th>
23+
<% when 'modify_guidance' %>
24+
<th class="dmp_th_medium" title="
25+
<%= _('Allows the user to create and edit guidance') %>">
26+
<%= _('Modify guidance') %>
27+
</th>
28+
<% when 'use_api' %>
29+
<th class="dmp_th_medium" title="
30+
<%= _('Provides the user with an API token and grants rights to harvest information from the tool') %>">
31+
<%= _('API rights') %>
32+
</th>
33+
<% when 'change_org_details' %>
34+
<th class="dmp_th_medium" title="
35+
<%= _('Allows the user to amend the organisation details (name, URL etc) and add basic branding such as the logo') %>">
36+
<%= _('Change organisation details') %>
37+
</th>
38+
<% end %>
1439
<% end %>
1540
</tr>
1641
</thead>
@@ -26,4 +51,4 @@
2651
</table>
2752
<%= submit_tag _('Save') %>
2853
<% end %>
29-
</div>
54+
</div>

lib/assets/bg.gif

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/assets/stylesheets/admin.css.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ table.tablesorter thead tr th{
16701670
padding-right: 20px;
16711671
}
16721672
table.tablesorter thead tr .header {
1673-
background-image: url(bg.gif);
1673+
background-image: asset-url("bg.gif");
16741674
background-repeat: no-repeat;
16751675
background-position: center right;
16761676
background-color: @orange_lighter_colour;
@@ -1679,10 +1679,10 @@ table.tablesorter thead tr .header {
16791679

16801680

16811681
table.tablesorter thead tr .headerSortUp {
1682-
background-image: url(asc.gif);
1682+
background-image: asset-url("asc.gif");
16831683
}
16841684
table.tablesorter thead tr .headerSortDown {
1685-
background-image: url(desc.gif);
1685+
background-image: asset-url("desc.gif");
16861686
}
16871687

16881688

lib/assets/stylesheets/bootstrap_and_overrides.css.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,15 +1851,15 @@ ul.help_ul li{
18511851
table.tablesorter thead {
18521852
th.header {
18531853
cursor: pointer;
1854-
background: url('/assets/bg.gif') no-repeat center right;
1854+
background: asset-url('bg.gif') no-repeat center right;
18551855
}
18561856

18571857
th.headerSortDown {
1858-
background: @orange_lighter_colour url('/assets/desc.gif') no-repeat center right;
1858+
background: @orange_lighter_colour asset-url('desc.gif') no-repeat center right;
18591859
}
18601860

18611861
th.headerSortUp {
1862-
background: @orange_lighter_colour url('/assets/asc.gif') no-repeat center right;
1862+
background: @orange_lighter_colour asset-url('asc.gif') no-repeat center right;
18631863
}
18641864
}
18651865

0 commit comments

Comments
 (0)