[openstreetmap-website] Eliminate style_rules helper (#79)

John Firebaugh notifications at github.com
Thu Jun 13 23:14:53 UTC 2013


This helper generates classes like `.hide_unless_logged_in` and `.hide_unless_administrator`, which are in turn relied on by helpers like `if_logged_in` and `if_administrator`. Continuing down the dependency chain, these helpers are used by the following templates:

* notes/show.jst.ejs
* diary_entry/list.html.erb 
* diary_entry/view.html.erb
* diary_entry/_diary_comment.html.erb 
* diary_entry/_diary_entry.html.erb 
* trace/list.html.erb 
* trace/view.html.erb

It looks like action caching for diary entries and traces was disabled in 4c9a3d4803e4a30e157b3b179f630e7f51f38625. Was this important functionality?

The notes template could be changed to use some template variables to determine whether or not to show the hide and close buttons. The variable value would come from data attributes -- e.g. instead of `.hide_if_logged_in { display: none !important }`, emit `data-logged-in=true`.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/79#issuecomment-19431000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20130613/f7dcdc51/attachment.html>


More information about the rails-dev mailing list