Module: RedmineDhtmlx::ApplicationHelper

Defined in:
app/helpers/redmine_dhtmlx/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#include_dhtmlx_gantt(options = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/helpers/redmine_dhtmlx/application_helper.rb', line 19

def include_dhtmlx_gantt(options = {})
  unless @include_dhtmlx_gantt
    tags = []

    tags << stylesheet_link_tag('/dhtmlx/gantt/dhtmlxgantt.css')
    tags << javascript_include_tag('/dhtmlx/gantt/dhtmlxgantt.js')

    content_for :header_tags do
      tags.join('').html_safe
    end

    @include_dhtmlx_gantt = true
  end
end

#include_dhtmlx_scheduler(options = {}) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'app/helpers/redmine_dhtmlx/application_helper.rb', line 34

def include_dhtmlx_scheduler(options = {})
  unless @include_dhtmlx_scheduler
    tags = []

    tags << stylesheet_link_tag('/dhtmlx/scheduler/dhtmlxscheduler.css')
    tags << javascript_include_tag('/dhtmlx/scheduler/dhtmlxscheduler.js')
    tags << javascript_include_tag("/dhtmlx/scheduler/locale/locale_#{I18n.locale.to_s}.js")
    tags << javascript_include_tag('/dhtmlx/scheduler/ext/dhtmlxscheduler_recurring.js')
    tags << javascript_include_tag('/dhtmlx/scheduler/ext/dhtmlxscheduler_expand.js')
    tags << javascript_include_tag('/dhtmlx/scheduler/ext/dhtmlxscheduler_container_autoresize.js')

    content_for :header_tags do
      tags.join('').html_safe
    end

    @include_dhtmlx_scheduler = true
  end
end

#include_dhtmlx_spreadsheet(options = {}) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
# File 'app/helpers/redmine_dhtmlx/application_helper.rb', line 53

def include_dhtmlx_spreadsheet(options = {})
  unless @include_dhtmlx_spreadsheet
    tags = []

    content_for :header_tags do
      tags.join('').html_safe
    end

    @include_dhtmlx_spreadsheet = true
  end
end

#include_dhtmlx_suite(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/helpers/redmine_dhtmlx/application_helper.rb', line 4

def include_dhtmlx_suite(options = {})
  unless @include_dhtmlx_suite
    tags = []

    tags << stylesheet_link_tag('/dhtmlx/suite/dhtmlx.css')
    tags << javascript_include_tag('/dhtmlx/suite/dhtmlx.js')

    content_for :header_tags do
      tags.join('').html_safe
    end

    @include_dhtmlx_suite = true
  end
end

#include_dhtmlx_vault(options = {}) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'app/helpers/redmine_dhtmlx/application_helper.rb', line 65

def include_dhtmlx_vault(options = {})
  unless @include_dhtmlx_vault
    tags = []

    tags << stylesheet_link_tag('/dhtmlx/vault/dhtmlxvault.css')
    tags << javascript_include_tag('/dhtmlx/vault/dhtmlxvault.js')

    content_for :header_tags do
      tags.join('').html_safe
    end

    @include_dhtmlx_vault = true
  end
end