requiring stylesheet only where it is really needed

pull/6827/head
Jens Ulferts 14 years ago
parent 6ce7c06258
commit 0dd12d3a11
  1. 4
      app/views/meeting_contents/_form.html.erb
  2. 6
      app/views/meeting_contents/_show.html.erb
  3. 4
      app/views/meeting_contents/diff.html.erb
  4. 6
      app/views/meeting_contents/history.html.erb
  5. 6
      app/views/meetings/_form.html.erb
  6. 6
      app/views/meetings/index.html.erb
  7. 6
      app/views/meetings/show.html.erb
  8. 10
      init.rb
  9. 9
      lib/redmine_meeting/view_hooks.rb

@ -6,4 +6,8 @@
<p><label for="<%= content_type %>_comment"><%= l(:field_comments) %></label><br /><%= f.text_field :comment, :size => 120 %></p>
<p><%= submit_tag l(:button_save) %> <%= link_to l(:button_cancel), "#", :onclick => "Element.show(\"#{content_type}-text\"); Element.hide(\"edit-#{content_type}\"); return false;" %></p>
<%= wikitoolbar_for "#{content_type}_text" %>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -12,4 +12,8 @@
<div class="wiki" id="<%= content_type %>-text">
<%= textilizable(content.present? ? content.text : "") %>
</div>
</div>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -15,3 +15,7 @@
<hr />
<%= html_diff(@diff) %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -7,7 +7,7 @@
<thead><tr>
<th>#</th>
<th></th>
<th></th>
<th></th>
<th><%= l(:field_updated_on) %></th>
<th><%= l(:field_author) %></th>
<th><%= l(:field_comments) %></th>
@ -29,3 +29,7 @@
<%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %>
<span class="pagination"><%= pagination_links_full @version_pages, @version_count, :page_param => :p %></span>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -31,4 +31,8 @@
</table>
</div>
<%= hidden_field_tag "copy_from_id", params[:copy_from_id] if params[:copy_from_id].present? %>
</div>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -35,4 +35,8 @@
<% end -%>
<% end -%>
</div>
<% end -%>
<% end -%>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -21,4 +21,8 @@
<div style="clear:both;"> </div>
</div>
<%= render_tabs [{:name => 'agenda', :action => :create_meeting_agendas, :partial => 'meeting_contents/tab', :label => :label_meeting_agenda, :content => @meeting.agenda, :content_type => "meeting_agenda"}, {:name => 'minutes', :action => :create_meeting_minutes, :partial => 'meeting_contents/tab', :label => :label_meeting_minutes, :content => @meeting.minutes, :content_type => "meeting_minutes"}] %>
<%= render_tabs [{:name => 'agenda', :action => :create_meeting_agendas, :partial => 'meeting_contents/tab', :label => :label_meeting_agenda, :content => @meeting.agenda, :content_type => "meeting_agenda"}, {:name => 'minutes', :action => :create_meeting_minutes, :partial => 'meeting_contents/tab', :label => :label_meeting_minutes, :content => @meeting.minutes, :content_type => "meeting_minutes"}] %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting' %>
<% end %>

@ -7,8 +7,6 @@ Dispatcher.to_prepare do
Project.send(:include, ::Plugin::Meeting::Project)
end
require_dependency 'redmine_meeting/view_hooks'
Redmine::Plugin.register :redmine_meeting do
name 'Redmine Meeting'
author 'Felix Schäfer @ finnlabs'
@ -16,9 +14,9 @@ Redmine::Plugin.register :redmine_meeting do
description 'This plugin adds a meeting module with functionality to plan and save the minutes of a meeting.'
url 'http://finn.de'
version '0.0.1'
requires_redmine :version_or_higher => '0.9'
project_module :meetings do
permission :create_meetings, {:meetings => [:new, :create]}, :require => :member
permission :edit_meetings, {:meetings => [:edit, :update]}, :require => :member
@ -27,7 +25,7 @@ Redmine::Plugin.register :redmine_meeting do
permission :create_meeting_agendas, {:meeting_agendas => [:update]}, :require => :member
permission :create_meeting_minutes, {:meeting_minutes => [:update]}, :require => :member
end
menu :project_menu, :meetings, {:controller => 'meetings', :action => 'index'}, :caption => :project_module_meetings, :param => :project_id
end

@ -1,9 +0,0 @@
module Plugin
module Meeting
class ViewHooks < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context={})
stylesheet_link_tag 'redmine_meeting', :plugin => 'redmine_meeting'
end
end
end
end
Loading…
Cancel
Save