OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/cost_reports/_group_by.rhtml

18 lines
806 B

<script type="text/javascript">
//<![CDATA[
function group_by_changed()
{
$('group_by[granulatrity]').setStyle({
'display': <%= @query.time_groups.inspect %>.include($("group_by[name]").value) ? 'inline' : 'none'});
}
//]]>
</script>
<%=
select_tag "group_by[name]", options_for_select(@query.group_by_columns_for_select, @query.group_by["name"]),
:class => "select-small", :onchange => "group_by_changed();"
%>
<%=
select_tag("group_by[granulatrity]", options_for_select([[l(:label_year), "year"], [l(:label_month), "month"], [l(:label_week), "week"], [l(:label_day), "day"]], @query.group_by["granulatrity"]),
:class => "select-small", :onload => "group_by_changed();", :style => ("display: none" unless @query.time_groups.include? @query.group_by["name"]))
%>