parent
809068cc93
commit
3e5c5e3f67
@ -1,10 +0,0 @@ |
||||
fail "upgrade ruby version, ruby < 1.8.7 suffers from Hash#hash bug" if {:a => 10}.hash != {:a => 10}.hash |
||||
#require "hwia_rails" |
||||
|
||||
require 'big_decimal_patch' |
||||
require 'to_date_patch' |
||||
|
||||
# Defines the minimum number of cells for a 'big' report |
||||
# Big reports may be handled differently in the UI - i.e. ask the user |
||||
# if he's really sure to execute such a heavy report |
||||
Widget::Table::Progressbar.const_set 'THRESHHOLD', 2000 |
@ -0,0 +1,5 @@ |
||||
fail "upgrade ruby version, ruby < 1.8.7 suffers from Hash#hash bug" if {:a => 10}.hash != {:a => 10}.hash |
||||
#require "hwia_rails" |
||||
|
||||
require 'reporting_engine/big_decimal_patch' |
||||
require 'reporting_engine/to_date_patch' |
@ -1,6 +1,4 @@ |
||||
require 'forwardable' |
||||
require 'proactive_autoloader' |
||||
require 'engine' |
||||
require 'reporting_engine/engine' |
||||
|
||||
class Report < ActiveRecord::Base |
||||
extend ProactiveAutoloader |
@ -1,4 +1,5 @@ |
||||
require 'set' |
||||
require 'reporting_engine/report' |
||||
|
||||
module Report::InheritedAttribute |
||||
include Report::QueryUtils |
@ -0,0 +1,3 @@ |
||||
module ReportingEngine |
||||
VERSION = '0.0.1' |
||||
end |
@ -1,3 +1,7 @@ |
||||
require 'reporting_engine/reporting_helper' |
||||
require 'reporting_engine/proactive_autoloader' |
||||
|
||||
|
||||
class Widget < ActionView::Base |
||||
include ActionView::Helpers::TagHelper |
||||
include ActionView::Helpers::AssetTagHelper |
@ -1,3 +1,5 @@ |
||||
require 'reporting_engine/report/inherited_attribute' |
||||
|
||||
class Widget::Table < Widget::Base |
||||
extend Report::InheritedAttribute |
||||
include ReportingHelper |
@ -1,12 +1,17 @@ |
||||
class Widget::Table::Progressbar < Widget::Base |
||||
dont_cache! |
||||
|
||||
# Defines the minimum number of cells for a 'big' report |
||||
# Big reports may be handled differently in the UI - i.e. ask the user |
||||
# if he's really sure to execute such a heavy report |
||||
THRESHHOLD = 2000 |
||||
|
||||
def render |
||||
if render_table? |
||||
render_widget Widget::Table, @subject, :to => (@output ||= "".html_safe) |
||||
else |
||||
write(content_tag :label, :style => "display:none" do |
||||
content_tag(:div, l(:label_progress_bar_explanation).html_safe) + |
||||
write (content_tag :label, :style => "display:none" do |
||||
content_tag(:div, l(:label_progress_bar_explanation).html_safe) + \ |
||||
render_progress_bar |
||||
end) |
||||
end |
@ -0,0 +1,22 @@ |
||||
$:.push File.expand_path("../lib", __FILE__) |
||||
|
||||
# Maintain your gem's version: |
||||
require "reporting_engine/version" |
||||
|
||||
# Describe your gem and declare its dependencies: |
||||
Gem::Specification.new do |s| |
||||
s.name = "reporting_engine" |
||||
s.version = ReportingEngine::VERSION |
||||
s.authors = "Finn GmbH" |
||||
s.email = "info@finn.de" |
||||
s.homepage = "http://www.finn.de" |
||||
s.summary = "Creates table reports with custom fields and grouping" |
||||
# s.description = "This plugin adds features enabling agile teams to work with OpenProject in Scrum projects." |
||||
# FIXME |
||||
#s.files = Dir["{app,config,db,lib}/**/*", "Rakefile", "README.rdoc"] |
||||
# FIXME |
||||
# s.test_files = Dir["spec/**/*"] |
||||
|
||||
s.add_dependency "rails", "~> 3.2.9" |
||||
s.add_dependency "json" |
||||
end |
Loading…
Reference in new issue