jinda 0.4.9 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/generators/jinda/install_generator.rb +13 -6
  4. data/lib/generators/jinda/templates/README.md +3 -3
  5. data/lib/generators/jinda/templates/app/assets/javascripts/{disable_enter_key.js-org → disable_enter_key.js} +0 -0
  6. data/lib/generators/jinda/templates/app/assets/stylesheets/modules.scss +84 -0
  7. data/lib/generators/jinda/templates/app/controllers/concerns/jinda_general_concern.rb +179 -0
  8. data/lib/generators/jinda/templates/app/controllers/concerns/jinda_run_concern.rb +351 -0
  9. data/lib/generators/jinda/templates/app/controllers/jinda_org/docs_controller.rb +55 -0
  10. data/lib/generators/jinda/templates/app/controllers/jinda_org/jinda_controller.rb +30 -544
  11. data/lib/generators/jinda/templates/app/controllers/jinda_org/notes_controller.rb +4 -7
  12. data/lib/generators/jinda/templates/app/jinda/index.mm +55 -15
  13. data/lib/generators/jinda/templates/app/jinda/template/view.html.erb +22 -23
  14. data/lib/generators/jinda/templates/app/models/jinda/doc.rb +31 -17
  15. data/lib/generators/jinda/templates/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
  16. data/lib/generators/jinda/templates/app/views/docs/doc_edit/doc_select.html.erb +14 -0
  17. data/lib/generators/jinda/templates/app/views/docs/doc_new/doc_form.html.erb +26 -0
  18. data/lib/generators/jinda/templates/app/views/docs/doc_new/doc_form.md +36 -0
  19. data/lib/generators/jinda/templates/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
  20. data/lib/generators/jinda/templates/app/views/docs/edit/select_note.html.erb +14 -0
  21. data/lib/generators/jinda/templates/app/views/docs/index.haml +21 -0
  22. data/lib/generators/jinda/templates/app/views/docs/my.haml +27 -0
  23. data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +3 -3
  24. data/lib/generators/jinda/templates/app/views/jinda/run_output.haml +3 -3
  25. data/lib/generators/jinda/templates/app/views/notes/my.haml +1 -1
  26. data/lib/jinda/helpers.rb +208 -59
  27. data/lib/jinda/version.rb +1 -1
  28. metadata +17 -8
  29. data/lib/generators/jinda/templates/app/controllers/ctrs_controller.rb-gem-test +0 -2
  30. data/lib/jinda/ template/view.html.erb +0 -25
  31. data/lib/jinda/app/jinda/template/view.html.erb +0 -27
@@ -13,15 +13,15 @@
13
13
 
14
14
  %h2 Recently tested with:
15
15
  %ul
16
- %li Rubygems 2.6.3
17
- %li Rails 6.0.1
16
+ %li Rubygems 2.7.1
17
+ %li Rails 6.0.3
18
18
  %li rails new YOURAPP --skip-test-unit --skip-bundle --skip-active-record --skip-javascript --skip-turbolinks
19
19
  %li (rails new YOURAPP -BOTJ)
20
20
 
21
21
 
22
22
  %h2 Installation
23
23
  %ul
24
- %li add gem 'jinda', '0.4.9'
24
+ %li add gem 'jinda', '0.5.4'
25
25
  %li bundle
26
26
  %li rails generate jinda:install
27
27
  %li (run all with "sh install.sh" )
@@ -22,7 +22,7 @@
22
22
  %th= t "user"
23
23
  %th= "date"
24
24
  - @xmain.docs.each do |doc|
25
- - next unless doc.display
25
+ - next unless doc.ma_display
26
26
  %tr
27
27
  %td= doc.id
28
28
  %td
@@ -32,7 +32,7 @@
32
32
  = image_tag 'page_attach.png'
33
33
  = link_to_blank align_text(doc.name), :controller=>"jinda", :action=>:document, :id=>doc.id
34
34
  %td= doc.filename
35
- %td= doc.user.name
36
- %td= date_thai doc.updated_at
35
+ %td= doc.user.code
36
+ %td= doc.updated_at
37
37
  = submit_tag @message
38
38
  %p
@@ -2,7 +2,7 @@
2
2
  %P
3
3
  - @page_title = 'My Notes'
4
4
  = paginate @notes
5
- %table{:id=>"note-table", :data-mode => "reflow", :data-role => "table"}
5
+ %table{:class=>"module-table", :data-mode => "reflow", :data-role => "table"}
6
6
  %tr
7
7
  %th Title
8
8
  %th Body
@@ -22,7 +22,7 @@ require 'active_support/core_ext'
22
22
  #
23
23
  # xvar is (become) global variable of current program including user, runseq, and services
24
24
  #
25
- ################################################################################
25
+ ########################################################################]
26
26
 
27
27
 
28
28
  module Jinda
@@ -30,6 +30,142 @@ module Jinda
30
30
  require "rexml/document"
31
31
  include REXML
32
32
  # methods from application_controller
33
+
34
+ ########################################################################]
35
+ # Each Service at one moment will create one xmain
36
+ ########################################################################]
37
+ def create_xmain(service)
38
+ c = name2camel(service.module.code)
39
+ custom_controller= "#{c}Controller"
40
+ params["return"] = request.env['HTTP_REFERER']
41
+ Jinda::Xmain.create :service=>service,
42
+ :start=>Time.now,
43
+ :name=>service.name,
44
+ :ip=> get_ip,
45
+ :status=>'I', # init
46
+ :user=>current_ma_user,
47
+ :xvars=> {
48
+ :service_id=>service.id,
49
+ :p=>params.to_unsafe_h,
50
+ :id=>params[:id],
51
+ :user_id=>current_ma_user.try(:id),
52
+ :custom_controller=>custom_controller,
53
+ :host=>request.host,
54
+ :referer=>request.env['HTTP_REFERER']
55
+ }
56
+ end
57
+ def clear_xmains
58
+ Jinda::Xmain.where(:status =>{'$in'=>['R','I']}).update_all(:status=>'X')
59
+ redirect_to action:"pending"
60
+ end
61
+ def ajax_notice
62
+ if notice=Jinda::Notice.recent(current_ma_user, request.env["REMOTE_ADDR"])
63
+ notice.update_attribute :unread, false
64
+ js = "notice('#{notice.message}');"
65
+ else
66
+ js = ""
67
+ end
68
+ render plain: "<script>#{js}</script>"
69
+ end
70
+
71
+ ########################################################################]
72
+ # Each xmain will create many run_seq as many as steps and form_steps
73
+ ########################################################################]
74
+ #
75
+ ############################## @runseq ################################]
76
+ # @runseq => #<Jinda::Runseq _id: 5df31912a54d758417a7afc9,
77
+ # created_at: 2019-12-13 04:52:34 UTC,
78
+ # updated_at: 2019-12-13 04:52:43 UTC,
79
+ # user_id: nil,
80
+ # xmain_id: BSON::ObjectId('5df31912a54d758417a7afc7'),
81
+ # action: "do",
82
+ # status: "R",
83
+ # code: "create",
84
+ # name: "Create Article",
85
+ # role: "",
86
+ # rule: "true",
87
+ # rstep: 2,
88
+ # form_step: 1,
89
+ # start: 2019-12-13 04:52:43 UTC,
90
+ # stop: nil,
91
+ # end: true,
92
+ # xml: "<node CREATED='1493419491125' ID='ID_1687683396' MODIFIED='1493483244848' TEXT='create: Create Article'><icon BUILTIN='bookmark'/></node>",
93
+ # ip: nil>
94
+ ########################################################################]
95
+
96
+ def create_runseq(xmain)
97
+ @xvars= xmain.xvars
98
+ default_role= get_default_role
99
+ xml= xmain.service.xml
100
+ root = REXML::Document.new(xml).root
101
+ i= 0; j= 0 # i= step, j= form_step
102
+ root.elements.each('node') do |activity|
103
+ text= activity.attributes['TEXT']
104
+ next if ma_comment?(text)
105
+ next if text =~/^rule:\s*/
106
+ action= freemind2action(activity.elements['icon'].attributes['BUILTIN']) if activity.elements['icon']
107
+ return false unless action
108
+ i= i + 1
109
+ output_ma_display= false
110
+ if action== ('output'|| 'list' ||'folder')
111
+ ma_display= get_option_xml("display", activity)
112
+ if ma_display && !affirm(ma_display)
113
+ output_ma_display= false
114
+ else
115
+ output_ma_display= true
116
+ end
117
+ end
118
+ j= j + 1 if (action=='form' || output_ma_display)
119
+ @xvars['referer'] = activity.attributes['TEXT'] if action=='redirect'
120
+ if action!= 'if' && !text.blank?
121
+ scode, name= text.split(':', 2)
122
+ name ||= scode; name.strip!
123
+ code= name2code(scode)
124
+ else
125
+ code= text
126
+ name= text
127
+ end
128
+ role= get_option_xml("role", activity) || default_role
129
+ rule= get_option_xml("rule", activity) || "true"
130
+ runseq= Jinda::Runseq.create :xmain=>xmain.id,
131
+ :name=> name, :action=> action,
132
+ :code=> code, :role=>role.upcase, :rule=> rule,
133
+ :rstep=> i, :form_step=> j, :status=>'I',
134
+ :xml=>activity.to_s
135
+ xmain.current_runseq= runseq.id if i==1
136
+ end
137
+ @xvars['total_steps']= i
138
+ @xvars['total_form_steps']= j
139
+ end
140
+
141
+ def init_vars(xmain)
142
+ @xmain= Jinda::Xmain.find xmain
143
+ @xvars= @xmain.xvars
144
+ @runseq= @xmain.runseqs.find @xmain.current_runseq
145
+ # authorize?
146
+ @xvars['current_step']= @runseq.rstep
147
+ @xvars['referrer']= request.referrer
148
+ session[:xmain_id]= @xmain.id
149
+ session[:runseq_id]= @runseq.id
150
+ unless params[:action]=='run_call'
151
+ @runseq.start ||= Time.now
152
+ @runseq.status= 'R' # running
153
+ @runseq.save
154
+ end
155
+ $xmain= @xmain; $xvars= @xvars
156
+ $runseq_id= @runseq.id
157
+ $user_id= current_ma_user.try(:id)
158
+ end
159
+ def init_vars_by_runseq(runseq_id)
160
+ @runseq= Jinda::Runseq.find runseq_id
161
+ @xmain= @runseq.xmain
162
+ @xvars= @xmain.xvars
163
+ #@xvars[:current_step]= @runseq.rstep
164
+ @runseq.start ||= Time.now
165
+ @runseq.status= 'R' # running
166
+ @runseq.save
167
+ end
168
+
33
169
  def b(s)
34
170
  "<b>#{s}</b>".html_safe
35
171
  end
@@ -41,9 +177,9 @@ module Jinda
41
177
  end
42
178
 
43
179
  def refresh_to(url='/', option={})
44
- if option[:alert]
45
- ma_log option[:alert]
46
- end
180
+ if option[:alert]
181
+ ma_log option[:alert]
182
+ end
47
183
  # skip #
48
184
  # Rails 5.2 not allow to use js inline call
49
185
  render inline: "<script>window.location.replace('#{url}')</script>"
@@ -63,13 +199,18 @@ module Jinda
63
199
  def redirect_to_root
64
200
  redirect_to root_path
65
201
  end
202
+ # Todo refactor code
66
203
  def get_option(opt, runseq=@runseq)
67
204
  xml= REXML::Document.new(runseq.xml).root
68
205
  url=''
69
- xml.each_element('///node') do |n|
70
- text= n.attributes['TEXT']
71
- url= text if text =~/^#{opt}:\s*/
206
+ # get option from second element of node using '//node'
207
+ xml.each_element('//node') do |n|
208
+ if n.attributes['TEXT']
209
+ text = n.attributes['TEXT']
210
+ url= text if text =~ /^#{opt}:\s*/
211
+ end
72
212
  end
213
+ return nil if url.blank?
73
214
  c, h= url.split(':', 2)
74
215
  opt= h ? h.strip : false
75
216
  end
@@ -151,7 +292,8 @@ module Jinda
151
292
  xml= @service.xml
152
293
  step1 = REXML::Document.new(xml).root.elements['node']
153
294
  role= get_option_xml("role", step1) || ""
154
- # rule= get_option_xml("rule", step1) || true
295
+ # rule= get_option_xml("rule", step1) || true
296
+ rule= get_option_xml("rule", step1) || true
155
297
  return true if role==""
156
298
  unless current_ma_user
157
299
  return role.blank?
@@ -159,17 +301,18 @@ module Jinda
159
301
  return false unless current_ma_user.role
160
302
  return current_ma_user.has_role(role)
161
303
  end
304
+
162
305
  end
163
306
  def ma_log(message)
164
307
  # Jinda::Notice.create :message => ERB::Util.html_escape(message.gsub("`","'")),
165
308
  # :unread=> true, :ip=> ($ip || request.env["REMOTE_ADDR"])
166
- if session[:user_id]
167
- Jinda::Notice.create :message => ERB::Util.html_escape(message.gsub("`","'")),
168
- :user_id => $user.id, :unread=> true, :ip=>request.env["REMOTE_ADDR"]
169
- else
170
- Jinda::Notice.create :message => ERB::Util.html_escape(message.gsub("`","'")),
171
- :unread=> true, :ip=>request.env["REMOTE_ADDR"]
172
- end
309
+ if session[:user_id]
310
+ Jinda::Notice.create :message => ERB::Util.html_escape(message.gsub("`","'")),
311
+ :user_id => $user.id, :unread=> true, :ip=>request.env["REMOTE_ADDR"]
312
+ else
313
+ Jinda::Notice.create :message => ERB::Util.html_escape(message.gsub("`","'")),
314
+ :unread=> true, :ip=>request.env["REMOTE_ADDR"]
315
+ end
173
316
  end
174
317
 
175
318
  alias :ma_notice :ma_log
@@ -236,7 +379,7 @@ module Jinda
236
379
  # end
237
380
  #@user ||= User.find_by_auth_token!(cookies[:auth_token]) if cookies[:auth_token]
238
381
  @user ||= User.where(:auth_token => cookies[:auth_token]).first if cookies[:auth_token]
239
- return @user
382
+ return @user
240
383
  end
241
384
 
242
385
  def ui_action?(s)
@@ -251,7 +394,7 @@ module Jinda
251
394
  # ""
252
395
  # end
253
396
  # end
254
-
397
+
255
398
  # ##########################################################################
256
399
  #
257
400
  # Create / Update Modules, Runseqs, Services from XML
@@ -281,9 +424,9 @@ module Jinda
281
424
  module_code= code.to_code
282
425
  menu_icon = m_icon(m)
283
426
 
284
- # ##########################################################################
285
- # First Node eg: Module Name
286
- # ##########################################################################
427
+ # ##########################################################################
428
+ # First Node eg: Module Name
429
+ # ##########################################################################
287
430
  # create or update to GmaModule
288
431
  ma_module= Jinda::Module.find_or_create_by :code=>module_code
289
432
  ma_module.update_attributes :uid=>ma_module.id.to_s, :icon=>menu_icon
@@ -293,9 +436,9 @@ module Jinda
293
436
  mseq += 1
294
437
  seq= 0
295
438
 
296
- # ##########################################################################
297
- # Second Nodes eg: Role, Link otherwise Services
298
- # ##########################################################################
439
+ # ##########################################################################
440
+ # Second Nodes eg: Role, Link otherwise Services
441
+ # ##########################################################################
299
442
  m.each_element('node') do |s|
300
443
  service_name= s.attributes["TEXT"].to_s
301
444
  scode, sname= service_name.split(':', 2)
@@ -318,9 +461,9 @@ module Jinda
318
461
  protected_services << ma_service.uid
319
462
  else
320
463
 
321
- # ##########################################################################
322
- # Second and Third Nodes eg: Role, Normal Services
323
- # ##########################################################################
464
+ # ##########################################################################
465
+ # Second and Third Nodes eg: Role, Normal Services
466
+ # ##########################################################################
324
467
  # normal service
325
468
  step1 = s.elements['node']
326
469
  role= get_option_xml("role", step1) || ""
@@ -376,7 +519,7 @@ module Jinda
376
519
  ########################################################################
377
520
  # Jinda Rake Task #
378
521
  ########################################################################
379
-
522
+
380
523
  def gen_views
381
524
  t = ["*** generate ui ***"]
382
525
 
@@ -389,7 +532,7 @@ module Jinda
389
532
  unless gen_view_file_exist?(dir)
390
533
  gen_view_mkdir(dir,t)
391
534
  end
392
-
535
+
393
536
  if s.code=='link'
394
537
  f= "app/views/#{s.module.code}/index.haml"
395
538
  $afile << f
@@ -400,7 +543,7 @@ module Jinda
400
543
  end
401
544
  next
402
545
  end
403
-
546
+
404
547
  dir ="app/views/#{s.module.code}/#{s.code}"
405
548
  unless gen_view_file_exist?(dir)
406
549
  gen_view_mkdir(dir,t)
@@ -444,18 +587,18 @@ module Jinda
444
587
 
445
588
  def process_models
446
589
 
447
- # app= get_app
448
- # t= ["process models"]
449
- # xml map sample from index.mm
450
- # node @CREATED=1273819432637 @ID=ID_1098419600 @MODIFIED=1334737006485 @TEXT=Jinda
451
- # node @CREATED=1273819462973 @ID=ID_282419531 @MODIFIED=1493705904561 @POSITION=right @TEXT=services
452
- # node @CREATED=1273819465949 @FOLDED=true @ID=ID_855471610 @MODIFIED=1493768913078 @POSITION=right @TEXT=roles
453
- # node @CREATED=1273819456867 @ID=ID_1677010054 @MODIFIED=1493418874718 @POSITION=left @TEXT=models
454
- # node @CREATED=1292122118499 @FOLDED=true @ID=ID_1957754752 @MODIFIED=1493705885123 @TEXT=person
455
- # node @CREATED=1292122236285 @FOLDED=true @ID=ID_959987887 @MODIFIED=1493768919147 @TEXT=address
456
- # node @CREATED=1493418879485 @ID=ID_1995497233 @MODIFIED=1493718770637 @TEXT=article
457
- # node @CREATED=1493418915637 @ID=ID_429078131 @MODIFIED=1493418930081 @TEXT=comment
458
-
590
+ # app= get_app
591
+ # t= ["process models"]
592
+ # xml map sample from index.mm
593
+ # node @CREATED=1273819432637 @ID=ID_1098419600 @MODIFIED=1334737006485 @TEXT=Jinda
594
+ # node @CREATED=1273819462973 @ID=ID_282419531 @MODIFIED=1493705904561 @POSITION=right @TEXT=services
595
+ # node @CREATED=1273819465949 @FOLDED=true @ID=ID_855471610 @MODIFIED=1493768913078 @POSITION=right @TEXT=roles
596
+ # node @CREATED=1273819456867 @ID=ID_1677010054 @MODIFIED=1493418874718 @POSITION=left @TEXT=models
597
+ # node @CREATED=1292122118499 @FOLDED=true @ID=ID_1957754752 @MODIFIED=1493705885123 @TEXT=person
598
+ # node @CREATED=1292122236285 @FOLDED=true @ID=ID_959987887 @MODIFIED=1493768919147 @TEXT=address
599
+ # node @CREATED=1493418879485 @ID=ID_1995497233 @MODIFIED=1493718770637 @TEXT=article
600
+ # node @CREATED=1493418915637 @ID=ID_429078131 @MODIFIED=1493418930081 @TEXT=comment
601
+
459
602
  models= @app.elements["//node[@TEXT='models']"] || REXML::Document.new
460
603
  models.each_element('node') do |model|
461
604
  # t << "= "+model.attributes["TEXT"]
@@ -463,14 +606,14 @@ module Jinda
463
606
  next if model_name.comment?
464
607
  model_code= name2code(model_name)
465
608
  model_file= "#{Rails.root}/app/models/#{model_code}.rb"
466
-
609
+
467
610
  if File.exists?(model_file)
468
611
  doc= File.read(model_file)
469
612
  else
470
613
  system("rails generate model #{model_code}")
471
614
  doc= File.read(model_file)
472
615
  end
473
-
616
+
474
617
  doc = add_utf8(doc)
475
618
  attr_hash= make_fields(model)
476
619
  doc = add_jinda(doc, attr_hash)
@@ -487,14 +630,14 @@ module Jinda
487
630
  def add_jinda(doc, attr_hash)
488
631
  if doc =~ /#{@btext}/
489
632
  s1,s2,s3= doc.partition(/ #{@btext}.*#{@etext}\n/m)
490
- s2= ""
633
+ s2= ""
491
634
  else
492
635
  s1,s2,s3= doc.partition("include Mongoid::Document\n")
493
636
  end
494
637
  doc= s1+s2+ <<-EOT
495
638
  #{@btext}
496
639
  include Mongoid::Timestamps
497
- EOT
640
+ EOT
498
641
 
499
642
  attr_hash.each do |a|
500
643
  # doc+= "\n*****"+a.to_s+"\n"
@@ -587,8 +730,8 @@ module Jinda
587
730
  ########################################################################
588
731
  # END code from jinda.rake #
589
732
  ########################################################################
590
-
591
-
733
+
734
+
592
735
  ########################################################################
593
736
  # Methods to be overrided by gemhelp #
594
737
  # for Rspec Test
@@ -608,7 +751,7 @@ module Jinda
608
751
  t << "create file #{f}"
609
752
  end
610
753
  ########################################################################
611
-
754
+
612
755
  def controller_exists?(modul)
613
756
  File.exists? "#{Rails.root}/app/controllers/#{modul}_controller.rb"
614
757
  end
@@ -633,11 +776,13 @@ module Jinda
633
776
  return true
634
777
  end
635
778
  end
779
+ # return nil or value of opt: if provided
636
780
  def get_option_xml(opt, xml)
637
781
  if xml
638
782
  url=''
639
783
  xml.each_element('node') do |n|
640
784
  text= n.attributes['TEXT']
785
+ # check if opt match from beginning of text
641
786
  url= text if text =~/^#{opt}/
642
787
  end
643
788
  return nil if url.blank?
@@ -652,7 +797,7 @@ module Jinda
652
797
  node.each_element("icon") do |mn|
653
798
  mcons << mn.attributes["BUILTIN"]
654
799
  end
655
- ticon = mcons[0].to_s
800
+ ticon = mcons[0].to_s
656
801
  return ticon
657
802
  end
658
803
 
@@ -682,8 +827,8 @@ module Jinda
682
827
 
683
828
  def freemind2action(s)
684
829
  case s.downcase
685
- #when 'bookmark' # Excellent
686
- # 'call'
830
+ #when 'bookmark' # Excellent
831
+ # 'call'
687
832
  when 'bookmark' # Excellent
688
833
  'do'
689
834
  when 'attach' # Look here
@@ -698,8 +843,12 @@ module Jinda
698
843
  'redirect'
699
844
  when 'kaddressbook' #Phone
700
845
  'invoke' # invoke new service along the way
701
- when 'list' # Output
846
+ when 'idea' # output
702
847
  'output'
848
+ when 'list' # List
849
+ 'list'
850
+ when 'folder' # Folder
851
+ 'folder'
703
852
  when 'mail'
704
853
  'mail'
705
854
  when 'xmag' # Tobe discussed
@@ -734,9 +883,9 @@ class String
734
883
  end
735
884
  def to_code
736
885
  s= self.dup
737
- # s.downcase!
738
- # s.gsub! /[\s\-_]/, ""
739
- # s
886
+ # s.downcase!
887
+ # s.gsub! /[\s\-_]/, ""
888
+ # s
740
889
  code, name = s.split(':')
741
890
  code.downcase.strip.gsub(' ','_').gsub(/[^#_\/a-zA-Z0-9]/,'')
742
891
  end
@@ -752,9 +901,9 @@ module ActionView
752
901
  end
753
902
  end
754
903
  class FormBuilder
755
- def date_select_thai(method)
756
- self.date_select method, :use_month_names=>THAI_MONTHS, :order=>[:day, :month, :year]
757
- end
904
+ def date_select_thai(method)
905
+ self.date_select method, :use_month_names=>THAI_MONTHS, :order=>[:day, :month, :year]
906
+ end
758
907
  def date_field(method, options = {})
759
908
  default= options[:default] || self.object.send(method) || Date.today
760
909
  data_options= ({"mode"=>"calbox"}).merge(options)
@@ -845,7 +994,7 @@ module ActionView
845
994
  init_map();
846
995
  });
847
996
  </script>
848
- EOT
997
+ EOT
849
998
  out.html_safe
850
999
  end
851
1000
  end