parent
85e407fc56
commit
1cb8fa8b53
@ -0,0 +1,31 @@ |
||||
module BacklogMenuHelper |
||||
unloadable |
||||
|
||||
def backlog_menu(is_sprint, items = []) |
||||
html = %{ |
||||
<ul class="actions pureCssMenu pureCssMenum"> |
||||
<li class="pureCssMenui"> |
||||
<a class="pureCssMenui" href="#"><span class="ui-icon ui-icon-triangle-1-s"></span></a> |
||||
<ul class="pureCssMenum"> |
||||
} |
||||
items.each do |item| |
||||
item[:condition] = true if item[:condition].nil? |
||||
if item[:condition] && ( (is_sprint && item[:for] == :sprint) || |
||||
(!is_sprint && item[:for] == :product) || |
||||
(item[:for] == :both) ) |
||||
html += %{ <li class="pureCssMenui">#{item[:item]}</li> } |
||||
end |
||||
end |
||||
html += %{ |
||||
</ul> |
||||
</li> |
||||
</ul> |
||||
} |
||||
end |
||||
|
||||
def menu_link(label, options = {}) |
||||
# options[:class] = "pureCssMenui" |
||||
link_to(label, options) |
||||
end |
||||
|
||||
end |
Loading…
Reference in new issue