Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
move view hook into hooks file, unify css

See merge request !3
  • Loading branch information
dkastl committed Sep 9, 2017
2 parents 13986b2 + 2cbb5a9 commit b1b5c22
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
5 changes: 0 additions & 5 deletions app/views/text_blocks/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@
}
});
<% end %>
<style type="text/css">
table.list.textblocks tbody td { vertical-align: top; }
table.list.textblocks tbody td.text { text-align: left; }
table.list.textblocks tbody td.text div { height: 3.8em; }
</style>
<% end %>
11 changes: 10 additions & 1 deletion assets/stylesheets/text_blocks.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/**************************************************************/
/* ICONS
/* ICONS
/**************************************************************/

#admin-menu a.text-blocks { background-image: url(../images/text_signature.png);}


/**************************************************************/
/* TextBlocks table
/**************************************************************/

table.list.textblocks tbody td { vertical-align: top; }
table.list.textblocks tbody td.text { text-align: left; }
table.list.textblocks tbody td.text div { height: 3.8em; }
7 changes: 1 addition & 6 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

project_module :text_blocks do

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

end

class TextBlocksListener < Redmine::Hook::ViewListener
render_on :view_layouts_base_html_head, inline: <<-END
<%= stylesheet_link_tag 'text_blocks', :plugin => 'redmine_text_blocks' %>
END
end
3 changes: 3 additions & 0 deletions lib/redmine_text_blocks/view_hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ class ViewHooks < Redmine::Hook::ViewListener
render_on :view_issues_edit_notes_bottom,
partial: 'hooks/text_blocks/view_issues_edit_notes_bottom'

render_on :view_layouts_base_html_head, inline: <<-END
<%= stylesheet_link_tag 'text_blocks', plugin: 'redmine_text_blocks' %>
END
end
end

0 comments on commit b1b5c22

Please sign in to comment.