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/lib/widget/table/progressbar.rb

23 lines
872 B

class Widget::Table::Progressbar < Widget::Base
dont_cache!
def render
if Widget::Table::ReportTable.new(@query).cached? || @query.size <= THRESHHOLD
render_widget Widget::Table::ReportTable, @query, :to => (@output ||= "".html_safe)
else
write(content_tag :label, :style => "display:none" do
content_tag(:div, l(:label_progress_bar_explanation).html_safe) +
render_progress_bar
end)
end
end
def render_progress_bar
content_tag(:div, "",
:id => "progressbar",
:class => "form_controls",
:"data-query-size" => @query.size,
:"data-translation" => ::I18n.translate(:label_load_query_question, :size => @query.size),
:"data-target" => url_for(:action => 'index', :set_filter => '1', :immediately => true))
end
end