Feature #12324
closed
Add hooks to Activity page
Added by Duane Hughes about 12 years ago.
Updated about 12 years ago.
Description
I have a plugin that makes use of the activity page - and I'd like to add custom icons for the acts_as_event :type that is defined in my plugin. I understand this would be best done with view hooks, but the activity page does not have any that I can see.
Would this be a possibility? Or is there another way I could add icons for the event types I want to implement?
Files
- Status changed from New to Closed
- Resolution set to Wont fix
Thanks, but I'm afraid it doesn't seem to work for me. So I add the following to the top of my plugin stylesheet:
dt.articles { background-image: url(../images/page_edit.png); }
That should pull the image file from my plugin_asset/pluginname/images/ directory. However, tracing the styles using Developer tools in Chrome or IE shows that it is not even pulling in the plugin's stylesheet (knowledgebase.css) anywhere:
This makes sense to me as nothing on the activity page is calling my plugin's CSS file, surely? Or have I done something wrong?
Your help and comments are much appreciated.
I should also mention that the acts_as_event line in the plugin model looks as follows (note the "type" line):
acts_as_event :title => Proc.new {blah blah },
:description => :summary,
:datetime => :updated_at,
:type => 'articles',
:url => Proc.new { |o| {:controller => 'articles', :action => 'show', :id => o.id, :project_id => o.project} }
acts_as_activity_provider :find_options => {:include => :project},
:author_key => :author_id,
:type => 'articles',
:timestamp => :updated_at,
:permission => :view_articles
- Status changed from Closed to Reopened
- Status changed from Reopened to Closed
If you want your plugin stylesheet to be loaded with the activity view, you have to use the view_layouts_base_html_head
hook in the base layout to include it if controller_name == 'activity'
.
I'm closing it, please use the forums for plugin development help requests.
Also available in: Atom
PDF