jinda 0.6.5 → 0.7.0.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/manifest.js +4 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/4dcity-old.ico +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/4dcity.ico +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/account.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/add.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/ajax-loader-circle.gif +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/ajax-loader.gif +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/anchor.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/application_double.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/application_form_edit.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_left.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_right.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_turn_left.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_turn_right.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/calendar.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/cancel.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/chart_bar.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/clock.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/cog.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/control_fastforward.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/control_play.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/cross.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/delete.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/external-link.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/facebook-continue-button.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/facebooksmall.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/favicon.ico +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/freemind(mm).png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/google-continue-button.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/help.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/highway-menu.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/highway.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/house.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/icons-18-black.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/icons-18-white.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/icons-36-black.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/icons-36-white.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/logo.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/logo_jinda.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/logout.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/new.gif +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/new.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/page.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/page_attach.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/page_green.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/page_output.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/page_pdf.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/pencil.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/printer.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/refresh.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/report.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/rssmall.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/tick.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/twittersmall.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/user.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/user_admin_gear.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/images/view_code.png +0 -0
- data/{lib/generators/jinda/templates/app/assets/javascripts/application.js-jqm → app/assets/javascripts/application.js-org} +8 -11
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/cable.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/disable_enter_key.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/iscroll-wrapper.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/iscroll.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jinda.js +0 -0
- data/app/assets/javascripts/jinda_jqm.js +24 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile-1.2.1.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile.datebox.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile.splitview.js +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/app.scss +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/articles.scss +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.eot +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.woff +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_black.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_blue.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_red.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-18-black.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-18-white.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-36-black.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-36-white.png +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/indicator.gif +0 -0
- data/{lib/generators/jinda/templates/app/assets/stylesheets/jinda.css → app/assets/stylesheets/jinda.scss} +20 -0
- data/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile-1.2.1.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.datebox.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.grids.collapsible.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.splitview.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/kul-4.2.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/kul-4.2.min.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/modules.scss +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/sarabun.css +0 -0
- data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/social.scss +0 -0
- data/{lib/generators/jinda/templates/app → app}/controllers/concerns/jinda_general_concern.rb +0 -0
- data/{lib/generators/jinda/templates/app → app}/controllers/concerns/jinda_run_concern.rb +0 -0
- data/{lib/generators/jinda/templates/app/controllers/jinda_org → app/controllers}/jinda_controller.rb +0 -0
- data/app/jinda/index.mm +369 -0
- data/app/jinda/template/index.mm +366 -0
- data/app/jinda/template/linkview.haml +21 -0
- data/app/jinda/template/view.html.erb +26 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_activity.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_menu.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_menu_mm.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_model.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_modul.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_pending_home.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_pending_page.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_service.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/_static.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/doc-thai.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/doc.md +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/error_logs.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/feed.rss.builder +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/help.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/index.html.haml +1 -1
- data/{lib/generators/jinda/templates/app → app}/views/jinda/logs.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/notice_logs.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/pending.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/run_form.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/run_output.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/search.haml +0 -0
- data/{lib/generators/jinda/templates/app → app}/views/jinda/status.haml +0 -0
- data/config/routes.rb +44 -0
- data/lib/generators/jinda/config_generator.rb +8 -0
- data/lib/generators/jinda/install_generator.rb +47 -44
- data/lib/generators/jinda/templates/Dockerfile +4 -2
- data/lib/generators/jinda/templates/app/assets/javascripts/application.js +1 -10
- data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +1 -20
- data/lib/generators/jinda/templates/app/views/articles/_report.haml +32 -0
- data/lib/generators/jinda/templates/app/views/articles/edit.haml +22 -11
- data/lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb +14 -12
- data/lib/generators/jinda/templates/app/views/articles/index.haml +3 -21
- data/lib/generators/jinda/templates/app/views/articles/my.haml +1 -16
- data/lib/generators/jinda/templates/app/views/articles/new_article/form_article.html.erb +1 -1
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +37 -21
- data/lib/generators/jinda/templates/app/views/identities/new.html.erb +29 -24
- data/lib/generators/jinda/templates/app/views/password_resets/new.html.erb +13 -7
- data/lib/generators/jinda/templates/app/views/sessions/new.html.erb +24 -18
- data/lib/generators/jinda/templates/docker-compose.yml +3 -2
- data/lib/generators/jinda/templates/entrypoint.sh +2 -1
- data/lib/jinda.rb +2 -1
- data/lib/jinda/date_helpers.rb +109 -0
- data/lib/jinda/{gemhelpers.rb → gem_helpers.rb} +0 -1
- data/lib/jinda/gen_class.rb +13 -0
- data/lib/jinda/gen_controller.rb +10 -0
- data/lib/jinda/gen_freemind.rb +33 -0
- data/lib/jinda/gen_helpers.rb +141 -0
- data/lib/jinda/gen_models.rb +137 -0
- data/lib/jinda/gen_runseq.rb +71 -0
- data/lib/jinda/gen_services.rb +90 -0
- data/lib/jinda/gen_xmain.rb +38 -0
- data/lib/jinda/get_app.rb +34 -0
- data/lib/jinda/helpers.rb +17 -998
- data/lib/jinda/init_vars.rb +36 -0
- data/lib/jinda/rake_views.rb +59 -0
- data/lib/jinda/refresh.rb +67 -0
- data/lib/jinda/themes.rb +163 -0
- data/lib/jinda/version.rb +1 -1
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +3 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +2 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/javascript/packs/application.js +15 -0
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +33 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +19 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +62 -0
- data/test/dummy/config/environments/production.rb +112 -0
- data/test/dummy/config/environments/test.rb +49 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +12 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +28 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +38 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/storage.yml +34 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +8 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/development_secret.txt +1 -0
- data/test/integration/navigation_test.rb +7 -0
- data/test/jinda_test.rb +7 -0
- data/test/test_helper.rb +19 -0
- metadata +224 -142
- data/lib/generators/jinda/templates/app/controllers/jinda_org/devs_controller.rb +0 -2
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/config/routes.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
# start jiinda method routes
|
3
|
+
jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']
|
4
|
+
jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']
|
5
|
+
jinda_methods += ['run_redirect', 'run_direct_to','run_if']
|
6
|
+
jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']
|
7
|
+
jinda_methods.each do |aktion| get "/jinda/#{aktion}" => "jinda##{aktion}" end
|
8
|
+
post '/jinda/init' => 'jinda#init'
|
9
|
+
post '/jinda/pending' => 'jinda#index'
|
10
|
+
post '/jinda/end_form' => 'jinda#end_form'
|
11
|
+
post '/jinda/end_output' => 'jinda#end_output'
|
12
|
+
# end jinda method routes
|
13
|
+
post '/auth/:provider/callback' => 'sessions#create'
|
14
|
+
get '/auth/:provider/callback' => 'sessions#create'
|
15
|
+
get '/auth/failure' => 'sessions#destroy'
|
16
|
+
get '/logout' => 'sessions#destroy', :as => 'logout'
|
17
|
+
get '/articles/my' => 'articles#my'
|
18
|
+
get '/articles/my/destroy' => 'articles#destroy'
|
19
|
+
get '/articles/show' => 'articles/show'
|
20
|
+
get '/articles/edit' => 'articles/edit'
|
21
|
+
get '/docs/my' => 'docs/my'
|
22
|
+
get '/notes/my' => 'notes/my'
|
23
|
+
get '/docs/my/destroy' => 'docs#destroy'
|
24
|
+
get '/notes/my/destroy/:id' => 'notes#destroy'
|
25
|
+
get '/notes/destroy/:id' => 'notes#destroy'
|
26
|
+
get '/jinda/document/:id' => 'jinda#document'
|
27
|
+
resources :articles do resources :comments end
|
28
|
+
resources :comments
|
29
|
+
resources :notes
|
30
|
+
resources :docs
|
31
|
+
resources :users
|
32
|
+
resources :identities
|
33
|
+
resources :sessions
|
34
|
+
resources :password_resets
|
35
|
+
resources :jinda, :only => [:index, :new]
|
36
|
+
# root :to => 'jinda#index'
|
37
|
+
# api
|
38
|
+
get '/api/v1/notes/my' => 'api/v1/notes#my'
|
39
|
+
post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'
|
40
|
+
namespace :api do
|
41
|
+
namespace :v1 do resources :notes, :only => [:index] end
|
42
|
+
end
|
43
|
+
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
44
|
+
end
|
@@ -65,6 +65,14 @@ module Jinda
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
desc "Setup Dockerfile"
|
69
|
+
def setup_docker
|
70
|
+
puts " Setup Docker files"
|
71
|
+
FileUtils.cp source_paths[0]+"/"+"Dockerfile", "Dockerfile"
|
72
|
+
FileUtils.cp source_paths[0]+"/"+"docker-compose.yml", "docker-compose.yml"
|
73
|
+
FileUtils.cp source_paths[0]+"/"+"entrypoint.sh", "entrypoint.sh"
|
74
|
+
end
|
75
|
+
|
68
76
|
def finish
|
69
77
|
puts " configured omniauth.\n"
|
70
78
|
puts " configured Mongoid.\n"
|
@@ -19,7 +19,7 @@ module Jinda
|
|
19
19
|
gem 'bson', '4.4.2'
|
20
20
|
gem 'mongoid', '7.1.0.rc0'
|
21
21
|
gem 'turbolinks_render'
|
22
|
-
gem 'nokogiri', '1.
|
22
|
+
gem 'nokogiri', '~> 1.11.0'
|
23
23
|
gem 'haml', '~> 5.1', '>= 5.1.2'
|
24
24
|
gem 'haml-rails', '~> 2.0.1'
|
25
25
|
gem 'mail'
|
@@ -53,7 +53,7 @@ module Jinda
|
|
53
53
|
gem 'selenium-webdriver'
|
54
54
|
gem 'rb-fsevent'
|
55
55
|
gem 'valid_attribute'
|
56
|
-
gem 'faker'
|
56
|
+
gem 'faker'
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -79,13 +79,14 @@ module Jinda
|
|
79
79
|
# inside("app/assets/javascripts") {(File.file? "application.js") ? ( say "Please include application-org.js in application.js", :red) : (FileUtils.mv 'application-org.js', 'application.js')}
|
80
80
|
# inside("app/assets/stylesheets") {(File.file? "application.css") ? ( say "Please include application-org.css in application.css", :red) : (FileUtils.mv 'application-org.css', 'application.css')}
|
81
81
|
# inside("app/assets/stylesheets") {(File.file? "application.css.scss") ? ( say "Please include application-org.css.scss in application.css.scss", :red) : (FileUtils.mv 'application-org.css.scss', 'application.css.scss')}
|
82
|
-
inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
|
83
82
|
inside("app/controllers") {(File.file? "admins_controller.rb") ? ( say "Please merge existing jinda_org/admins_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/admins_controller.rb', 'admins_controller.rb')}
|
84
83
|
inside("app/controllers") {(File.file? "articles_controller.rb") ? ( say "Please merge existing jinda_org/articles_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/articles_controller.rb', 'articles_controller.rb')}
|
85
84
|
inside("app/controllers") {(File.file? "comments_controller.rb") ? ( say "Please merge existing jinda_org/comments_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/comments_controller.rb', 'comments_controller.rb')}
|
86
85
|
inside("app/controllers") {(File.file? "docs_controller.rb") ? ( say "Please merge existing jinda_org/docs_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/docs_controller.rb', 'docs_controller.rb')}
|
87
86
|
inside("app/controllers") {(File.file? "identities_controller.rb") ? ( say "Please merge existing jinda_org/identities_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/identities_controller.rb', 'identities_controller.rb')}
|
88
|
-
inside("app/controllers") {(File.file? "
|
87
|
+
inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
|
88
|
+
## Moved to Engine
|
89
|
+
# inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say "Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
|
89
90
|
inside("app/controllers") {(File.file? "password_resets_controller.rb") ? ( say "Please merge existing jinda_org/password_resets_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets_controller.rb', 'password_resets_controller.rb')}
|
90
91
|
inside("app/controllers") {(File.file? "password_resets.rb") ? ( say "Please merge existing jinda_org/password_resets.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets.rb', 'password_resets.rb')}
|
91
92
|
inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say "Please merge existing jinda_org/sessions_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
|
@@ -94,49 +95,50 @@ module Jinda
|
|
94
95
|
inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say "Please merge existing jinda_org/notes_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
|
95
96
|
end
|
96
97
|
# routes created each line as reversed order in routes
|
98
|
+
# Moved routes to Engine
|
97
99
|
def setup_routes
|
98
100
|
# route "end"
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
# route " end"
|
102
|
+
# route " namespace :v1 do resources :notes, :only => [:index] end"
|
103
|
+
# route " namespace :api do"
|
104
|
+
# route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
|
105
|
+
# route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
|
106
|
+
# route "\# api"
|
105
107
|
route "root :to => 'jinda#index'"
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
108
|
+
# route "resources :jinda, :only => [:index, :new]"
|
109
|
+
# route "resources :password_resets"
|
110
|
+
# route "resources :sessions"
|
111
|
+
# route "resources :identities"
|
112
|
+
# route "resources :users"
|
113
|
+
# route "resources :docs"
|
114
|
+
# route "resources :notes"
|
115
|
+
# route "resources :comments"
|
116
|
+
# route "resources :articles do resources :comments end"
|
117
|
+
# route "get '/jinda/document/:id' => 'jinda#document'"
|
118
|
+
# route "get '/notes/destroy/:id' => 'notes#destroy'"
|
119
|
+
# route "get '/notes/my/destroy/:id' => 'notes#destroy'"
|
120
|
+
# route "get '/docs/my/destroy' => 'docs#destroy'"
|
121
|
+
# route "get '/notes/my' => 'notes/my'"
|
122
|
+
# route "get '/docs/my' => 'docs/my'"
|
123
|
+
# route "get '/articles/edit' => 'articles/edit'"
|
124
|
+
# route "get '/articles/show' => 'articles/show'"
|
125
|
+
# route "get '/articles/my/destroy' => 'articles#destroy'"
|
126
|
+
# route "get '/articles/my' => 'articles#my'"
|
127
|
+
# route "get '/logout' => 'sessions#destroy', :as => 'logout'"
|
128
|
+
# route "get '/auth/failure' => 'sessions#destroy'"
|
129
|
+
# route "get '/auth/:provider/callback' => 'sessions#create'"
|
130
|
+
# route "post '/auth/:provider/callback' => 'sessions#create'"
|
131
|
+
# route "\# end jinda method routes"
|
132
|
+
# route "post '/jinda/end_output' => 'jinda#end_output'"
|
133
|
+
# route "post '/jinda/end_form' => 'jinda#end_form'"
|
134
|
+
# route "post '/jinda/pending' => 'jinda#index'"
|
135
|
+
# route "post '/jinda/init' => 'jinda#init'"
|
136
|
+
# route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
|
137
|
+
# route "jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']"
|
138
|
+
# route "jinda_methods += ['run_redirect', 'run_direct_to','run_if']"
|
139
|
+
# route "jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']"
|
140
|
+
# route "jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']"
|
141
|
+
# route "\# start jiinda method routes"
|
140
142
|
end
|
141
143
|
|
142
144
|
def setup_env
|
@@ -210,6 +212,7 @@ Mongoid::Config.belongs_to_required_by_default = false
|
|
210
212
|
end
|
211
213
|
inject_into_file 'config/environments/development.rb', :after => 'config.action_mailer.raise_delivery_errors = false' do
|
212
214
|
"\n config.action_mailer.default_url_options = { :host => 'localhost:3000' }"
|
215
|
+
"\n config.assets.check_precompiled_asset = false"
|
213
216
|
end
|
214
217
|
inject_into_file 'config/environments/production.rb', :after => 'config.assets.compile = false' do
|
215
218
|
"\n config.assets.compile = true"
|
@@ -11,13 +11,15 @@ COPY . /myapp
|
|
11
11
|
|
12
12
|
# Set Rails environment to production
|
13
13
|
# ENV RAILS_ENV production
|
14
|
-
|
15
|
-
|
14
|
+
ENV RAILS_ENV development
|
15
|
+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
16
|
+
&& apt install -y nodejs
|
16
17
|
|
17
18
|
# Add a script to be executed every time the container starts.
|
18
19
|
COPY entrypoint.sh /usr/bin/
|
19
20
|
RUN chmod +x /usr/bin/entrypoint.sh
|
20
21
|
ENTRYPOINT ["entrypoint.sh"]
|
22
|
+
# EXPOSE 3000
|
21
23
|
EXPOSE 3000
|
22
24
|
|
23
25
|
# Start the main process.
|
@@ -10,15 +10,6 @@
|
|
10
10
|
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
11
|
// GO AFTER THE REQUIRES BELOW.
|
12
12
|
//
|
13
|
-
//= require
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require jquery.mobile.splitview
|
16
|
-
//= require jquery.mobile-1.2.1
|
17
|
-
//= require jquery.mobile.datebox
|
18
|
-
//= require iscroll-wrapper
|
19
|
-
//= require iscroll
|
20
|
-
//= require jinda
|
21
|
-
// require turbolinks
|
22
|
-
// require disable_enter_key.js
|
13
|
+
//= require jinda_jqm
|
23
14
|
|
24
15
|
|
@@ -12,23 +12,4 @@
|
|
12
12
|
*= require_self
|
13
13
|
*= require normalize-rails
|
14
14
|
*/
|
15
|
-
|
16
|
-
@import "jquery.mobile-1.2.1";
|
17
|
-
@import "jquery.mobile.splitview";
|
18
|
-
@import "jquery.mobile.grids.collapsible";
|
19
|
-
@import "jquery.mobile.datebox.css";
|
20
|
-
@import "sarabun";
|
21
|
-
@import "jinda";
|
22
|
-
@import "kul-4.2";
|
23
|
-
@import "articles";
|
24
|
-
@import "app.scss";
|
25
|
-
@import "font-awesome-sprockets";
|
26
|
-
@import "font-awesome";
|
27
|
-
@import "social";
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
15
|
+
@import "jinda_jqm"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.box.box-info
|
2
|
+
.box-header.with-border
|
3
|
+
|
4
|
+
%h3.box-title
|
5
|
+
= @page_title
|
6
|
+
.label-warning
|
7
|
+
= flash[:notice]
|
8
|
+
.box-tools.pull-right
|
9
|
+
%button.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"}
|
10
|
+
%i.fa.fa-minus
|
11
|
+
%button.btn.btn-box-tool{"data-widget" => "remove", :type => "button"}
|
12
|
+
%i.fa.fa-times
|
13
|
+
/ /.box-header
|
14
|
+
.box-body
|
15
|
+
.table-responsive
|
16
|
+
%table.table.no-margin
|
17
|
+
%thead
|
18
|
+
%tr
|
19
|
+
%th Title
|
20
|
+
%th Description
|
21
|
+
%th Created
|
22
|
+
%th Updated
|
23
|
+
%th Delete
|
24
|
+
%th Edit
|
25
|
+
- report.each do |article|
|
26
|
+
%tr
|
27
|
+
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
|
28
|
+
%td= article.text.html_safe
|
29
|
+
%td= article.created_at.strftime('%m/%d/%Y')
|
30
|
+
%td= article.updated_at.strftime('%m/%d/%Y')
|
31
|
+
%td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
32
|
+
%td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,12 +1,23 @@
|
|
1
|
+
- @title= "Edit"
|
2
|
+
- @page_title = 'Edit'
|
3
|
+
.container
|
4
|
+
%div.row::before
|
5
|
+
%div.col-md-12
|
6
|
+
%h2.display-3.mt-5.pt-5
|
7
|
+
= @article.title
|
8
|
+
%hr
|
9
|
+
= @article.text
|
10
|
+
%h4.display-5
|
11
|
+
= @article.body.html_safe
|
1
12
|
|
2
|
-
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
.container
|
14
|
+
.card
|
15
|
+
= form_for @article, :html => {:class => "form-horizontal center"} , :article_id => @article.id do |f|
|
16
|
+
.form-group
|
17
|
+
= f.text_field :title, class: "form-control", :required => true
|
18
|
+
.form-group
|
19
|
+
= f.text_field :text, class: "form-control", :required => true
|
20
|
+
.form-group
|
21
|
+
= f.text_area :body, rows: 10, class: "form-control"
|
22
|
+
.form-group
|
23
|
+
= f.submit "Submit", class: "btn btn-default btn-success"
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
%>
|
4
|
-
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
article = Article.find_by :id=> $xvars["select_article"]["title"]
|
3
|
+
%>
|
4
|
+
<div class ="module-table">
|
5
|
+
<%= fields_for article do |f| %>
|
6
|
+
<%= f.label :title, "Title" %>
|
7
|
+
<%= f.text_field :title %>
|
8
|
+
<%= f.label :text, "Text" %>
|
9
|
+
<%= f.text_field :text %>
|
10
|
+
<%= f.label :text, "Keywords" %>
|
11
|
+
<%= f.text_field :keywords %>
|
12
|
+
<%= f.label :body, "Body Content" %>
|
13
|
+
<%= f.text_area :body %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -1,23 +1,5 @@
|
|
1
1
|
- @title= "All Articles"
|
2
|
+
%p
|
3
|
+
- @page_title = 'All Articlces'
|
4
|
+
= render :partial => 'report', locals: { report: @articles}
|
2
5
|
= paginate @articles
|
3
|
-
%table{:id=>"pending-table", :width=>"100%"}
|
4
|
-
%tr{:style=>"color:black; background-color:#97BF60;"}
|
5
|
-
%th User
|
6
|
-
%th Title
|
7
|
-
%th Description
|
8
|
-
%th Created
|
9
|
-
%th Updated
|
10
|
-
%th Delete
|
11
|
-
- @articles.each do |article|
|
12
|
-
%tr
|
13
|
-
%td= article.user.code if article.user
|
14
|
-
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id=>article.id
|
15
|
-
%td= article.text
|
16
|
-
%td= article.created_at
|
17
|
-
%td= article.updated_at
|
18
|
-
%td(align='center')
|
19
|
-
- next unless login?
|
20
|
-
- unless current_ma_user.role.upcase.split(',').include?("A")
|
21
|
-
- next unless article.user
|
22
|
-
- next unless current_ma_user == article.user
|
23
|
-
= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,20 +1,5 @@
|
|
1
1
|
- @title= "My Articles"
|
2
2
|
%p
|
3
3
|
- @page_title = 'All Articlces'
|
4
|
+
= render :partial => 'report', locals: { report: @my_articles}
|
4
5
|
= paginate @my_articles
|
5
|
-
%table#article-table
|
6
|
-
%tr
|
7
|
-
%th Title
|
8
|
-
%th Description
|
9
|
-
%th Created
|
10
|
-
%th Updated
|
11
|
-
%th Delete
|
12
|
-
%th Edit
|
13
|
-
- @my_articles.each do |article|
|
14
|
-
%tr
|
15
|
-
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
|
16
|
-
%td= article.text.html_safe
|
17
|
-
%td= article.created_at.strftime('%m/%d/%Y')
|
18
|
-
%td= article.updated_at.strftime('%m/%d/%Y')
|
19
|
-
%td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
20
|
-
%td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,26 +1,42 @@
|
|
1
1
|
- title @article.title
|
2
2
|
- description @article.text
|
3
3
|
- keywords @article.keywords
|
4
|
+
.container
|
5
|
+
%div.row::before
|
6
|
+
%div.col-md-12
|
7
|
+
%h2.display-3.mt-5.pt-5
|
8
|
+
= @article.title
|
9
|
+
= link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
|
10
|
+
%hr
|
11
|
+
= @article.text
|
12
|
+
%h4.display-5
|
13
|
+
= @article.body.html_safe
|
14
|
+
- @comments.each do |comment|
|
15
|
+
%div#article-comment.ui-corner-all
|
16
|
+
.col-md-10.col-sm-12
|
17
|
+
%div.small-box.bg-gray
|
18
|
+
%div.inner
|
19
|
+
%div.font-weight-light
|
20
|
+
Author:
|
21
|
+
%b= comment.user.code if comment.user
|
22
|
+
%div#comment-body
|
23
|
+
%i= comment.body
|
24
|
+
%hr
|
4
25
|
|
5
|
-
|
6
|
-
|
7
|
-
#article-title= @article.title
|
26
|
+
.container
|
27
|
+
.card
|
8
28
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
= f.label :body, "Comment"
|
24
|
-
= f.text_area :body
|
25
|
-
= f.hidden_field :user_id, :value => current_ma_user
|
26
|
-
= f.submit
|
29
|
+
- if login?
|
30
|
+
%h4.display-5
|
31
|
+
Add a comment:
|
32
|
+
= form_with(model: [@article, Comment.new], local: true) do |f|
|
33
|
+
.form-group
|
34
|
+
= f.hidden_field :article_id, :value => @article.id
|
35
|
+
.form-group
|
36
|
+
= f.label :body, "Comment"
|
37
|
+
.form-group
|
38
|
+
= f.text_area :body, rows: 5, class: "form-control"
|
39
|
+
.form-group
|
40
|
+
= f.hidden_field :user_id, :value => current_ma_user
|
41
|
+
.form-group
|
42
|
+
= f.submit "Submit", class: "btn btn-default btn-success"
|