joshsten / redmine_jchat

Chat Plugin for Redmine 1.0.x,1.1.x,1.2.x - Driven on MySQL no need to install any extra gems. Use at own risk. I will do my best to add features over time, but I am a busy student so I apologize for slow release/response times.
39 stars 22 forks source link

Use hooks instead of replacing the layout #5

Closed bb closed 13 years ago

bb commented 13 years ago

Hey Joshsten, thanks for the plugin. Works finde here on latest Redmine head revision.

I saw that you created a custom layout which replaces the original layout. This is inconvenient for people who adjusted the layout to their needs.

Please consider using the hooks which are provided in the original layout: For the includes: :view_layouts_base_html_head

For the actual chat in the footer: :view_layouts_base_body_bottom

Thanks a lot! Benjamin

joshsten commented 13 years ago

Thank you for the feedback. I will make the changes as soon as I have time. The hooks thing especially I've been trying to find a different approach to that for a while for the very reason you mentioned.

joshsten commented 13 years ago

Fix applied.

bb commented 13 years ago

That was quick. Thank you!

cforce commented 13 years ago

Hmm. we have own redmine theme, and after we applied your plugin our layout broke. Our redmine theme application.css looks like this http://pastebin.com/e2BWV4cX The menue header shall be shown on "two" rows, but no the second menue header row hangs over into the body area.

joshsten commented 13 years ago

The pastebin link is broken :/ I'll try to add a "namespace" of sorts to the css and javascript this weekend. It's possible the custom layout and css in the plugin have conflicting names.

bb commented 13 years ago

joshsten: the pastebin link works if you open it and then remove the 2 spaces (%20%20) from the URL

cforce commented 13 years ago

We tracked down the error to the cause and found that main parts of the general layout of the main page "redmine-trunk/app/views/layouts/base.rhtml" are overwritten by your plugin in file "app\views\layouts\base.rhtml". Can u please only chnage or add content via hooks and don't redefine the redmine defaults, cause this will make problems with redmine updates and other plugins. We adopted the plugins's base.rhtml now to our redmine base.rhtml actual version 1.02, but its still a copy paste code.

joshsten commented 13 years ago

I didn't add a -A on the git commit so the original base layout override still stayed on github even though the hooks were in place.

I am still a little new to git. I apologize for your troubles cforce. Thank you for letting me know. The latest commit should be fixed.