Skip to content

Commit b1b5c22

Browse files
committed
Merge branch 'develop' into 'master'
move view hook into hooks file, unify css See merge request !3
2 parents 13986b2 + 2cbb5a9 commit b1b5c22

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

app/views/text_blocks/_list.html.erb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,4 @@
3232
}
3333
});
3434
<% end %>
35-
<style type="text/css">
36-
table.list.textblocks tbody td { vertical-align: top; }
37-
table.list.textblocks tbody td.text { text-align: left; }
38-
table.list.textblocks tbody td.text div { height: 3.8em; }
39-
</style>
4035
<% end %>

assets/stylesheets/text_blocks.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
/**************************************************************/
2-
/* ICONS
2+
/* ICONS
33
/**************************************************************/
44

55
#admin-menu a.text-blocks { background-image: url(../images/text_signature.png);}
6+
7+
8+
/**************************************************************/
9+
/* TextBlocks table
10+
/**************************************************************/
11+
12+
table.list.textblocks tbody td { vertical-align: top; }
13+
table.list.textblocks tbody td.text { text-align: left; }
14+
table.list.textblocks tbody td.text div { height: 3.8em; }

init.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
project_module :text_blocks do
2020

21-
permission :view_text_blocks, {}, require: :member, read: :true
21+
permission :view_text_blocks, {}, require: :member, read: true
2222
permission :manage_text_blocks, {
2323
text_blocks: %i( new edit update create destroy ),
2424
projects: %i( manage_text_blocks )
@@ -31,8 +31,3 @@
3131

3232
end
3333

34-
class TextBlocksListener < Redmine::Hook::ViewListener
35-
render_on :view_layouts_base_html_head, inline: <<-END
36-
<%= stylesheet_link_tag 'text_blocks', :plugin => 'redmine_text_blocks' %>
37-
END
38-
end

lib/redmine_text_blocks/view_hooks.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ class ViewHooks < Redmine::Hook::ViewListener
44
render_on :view_issues_edit_notes_bottom,
55
partial: 'hooks/text_blocks/view_issues_edit_notes_bottom'
66

7+
render_on :view_layouts_base_html_head, inline: <<-END
8+
<%= stylesheet_link_tag 'text_blocks', plugin: 'redmine_text_blocks' %>
9+
END
710
end
811
end

0 commit comments

Comments
 (0)