jinda_engine 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +173 -0
- data/Rakefile +32 -0
- data/app/assets/config/jinda_engine/manifest.js +4 -0
- data/app/assets/images/jinda_engine/4dcity-old.ico +0 -0
- data/app/assets/images/jinda_engine/4dcity.ico +0 -0
- data/app/assets/images/jinda_engine/account.png +0 -0
- data/app/assets/images/jinda_engine/add.png +0 -0
- data/app/assets/images/jinda_engine/ajax-loader-circle.gif +0 -0
- data/app/assets/images/jinda_engine/ajax-loader.gif +0 -0
- data/app/assets/images/jinda_engine/anchor.png +0 -0
- data/app/assets/images/jinda_engine/application_double.png +0 -0
- data/app/assets/images/jinda_engine/application_form_edit.png +0 -0
- data/app/assets/images/jinda_engine/arrow_left.png +0 -0
- data/app/assets/images/jinda_engine/arrow_right.png +0 -0
- data/app/assets/images/jinda_engine/arrow_turn_left.png +0 -0
- data/app/assets/images/jinda_engine/arrow_turn_right.png +0 -0
- data/app/assets/images/jinda_engine/calendar.png +0 -0
- data/app/assets/images/jinda_engine/cancel.png +0 -0
- data/app/assets/images/jinda_engine/chart_bar.png +0 -0
- data/app/assets/images/jinda_engine/clock.png +0 -0
- data/app/assets/images/jinda_engine/cog.png +0 -0
- data/app/assets/images/jinda_engine/control_fastforward.png +0 -0
- data/app/assets/images/jinda_engine/control_play.png +0 -0
- data/app/assets/images/jinda_engine/cross.png +0 -0
- data/app/assets/images/jinda_engine/delete.png +0 -0
- data/app/assets/images/jinda_engine/external-link.png +0 -0
- data/app/assets/images/jinda_engine/facebook-continue-button.png +0 -0
- data/app/assets/images/jinda_engine/facebooksmall.png +0 -0
- data/app/assets/images/jinda_engine/favicon.ico +0 -0
- data/app/assets/images/jinda_engine/freemind(mm).png +0 -0
- data/app/assets/images/jinda_engine/google-continue-button.png +0 -0
- data/app/assets/images/jinda_engine/help.png +0 -0
- data/app/assets/images/jinda_engine/highway-menu.png +0 -0
- data/app/assets/images/jinda_engine/highway.png +0 -0
- data/app/assets/images/jinda_engine/house.png +0 -0
- data/app/assets/images/jinda_engine/icons-18-black.png +0 -0
- data/app/assets/images/jinda_engine/icons-18-white.png +0 -0
- data/app/assets/images/jinda_engine/icons-36-black.png +0 -0
- data/app/assets/images/jinda_engine/icons-36-white.png +0 -0
- data/app/assets/images/jinda_engine/logo.png +0 -0
- data/app/assets/images/jinda_engine/logo_jinda.png +0 -0
- data/app/assets/images/jinda_engine/logout.png +0 -0
- data/app/assets/images/jinda_engine/new.gif +0 -0
- data/app/assets/images/jinda_engine/new.png +0 -0
- data/app/assets/images/jinda_engine/page.png +0 -0
- data/app/assets/images/jinda_engine/page_attach.png +0 -0
- data/app/assets/images/jinda_engine/page_green.png +0 -0
- data/app/assets/images/jinda_engine/page_output.png +0 -0
- data/app/assets/images/jinda_engine/page_pdf.png +0 -0
- data/app/assets/images/jinda_engine/pencil.png +0 -0
- data/app/assets/images/jinda_engine/printer.png +0 -0
- data/app/assets/images/jinda_engine/refresh.png +0 -0
- data/app/assets/images/jinda_engine/report.png +0 -0
- data/app/assets/images/jinda_engine/rssmall.png +0 -0
- data/app/assets/images/jinda_engine/tick.png +0 -0
- data/app/assets/images/jinda_engine/twittersmall.png +0 -0
- data/app/assets/images/jinda_engine/user.png +0 -0
- data/app/assets/images/jinda_engine/user_admin_gear.png +0 -0
- data/app/assets/images/jinda_engine/view_code.png +0 -0
- data/app/assets/javascripts/jinda_engine/application.js +24 -0
- data/app/assets/javascripts/jinda_engine/application.js-jqm +27 -0
- data/app/assets/javascripts/jinda_engine/cable.js +13 -0
- data/app/assets/javascripts/jinda_engine/disable_enter_key.js +10 -0
- data/app/assets/javascripts/jinda_engine/iscroll-wrapper.js +32 -0
- data/app/assets/javascripts/jinda_engine/iscroll.js +1084 -0
- data/app/assets/javascripts/jinda_engine/jinda.js +14 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile-1.2.1.js +9272 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile.datebox.js +1778 -0
- data/app/assets/javascripts/jinda_engine/jquery.mobile.splitview.js +695 -0
- data/app/assets/stylesheets/jinda_engine/app.scss +90 -0
- data/app/assets/stylesheets/jinda_engine/application.css.scss +34 -0
- data/app/assets/stylesheets/jinda_engine/articles.scss +94 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bold.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bolditalic.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/sarabun_italic.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew.css +47 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/app/assets/stylesheets/jinda_engine/images/ajax-loader.gif +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_blue.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/button_red.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-18-black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-18-white.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-36-black.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/icons-36-white.png +0 -0
- data/app/assets/stylesheets/jinda_engine/images/indicator.gif +0 -0
- data/app/assets/stylesheets/jinda_engine/jinda.css +52 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile-1.2.1.css +2339 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.datebox.css +65 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.grids.collapsible.css +122 -0
- data/app/assets/stylesheets/jinda_engine/jquery.mobile.splitview.css +128 -0
- data/app/assets/stylesheets/jinda_engine/kul-4.2.css +1516 -0
- data/app/assets/stylesheets/jinda_engine/kul-4.2.min.css +11 -0
- data/app/assets/stylesheets/jinda_engine/modules.scss +84 -0
- data/app/assets/stylesheets/jinda_engine/sarabun.css +37 -0
- data/app/assets/stylesheets/jinda_engine/social.scss +133 -0
- data/app/controllers/jindra_engine/admins_controller.rb +9 -0
- data/app/controllers/jindra_engine/api/v1/notes_controller.rb +81 -0
- data/app/controllers/jindra_engine/application_controller.rb +44 -0
- data/app/controllers/jindra_engine/articles_controller.rb +112 -0
- data/app/controllers/jindra_engine/comments_controller.rb +21 -0
- data/app/controllers/jindra_engine/concerns/jinda_general_concern.rb +179 -0
- data/app/controllers/jindra_engine/concerns/jinda_run_concern.rb +365 -0
- data/app/controllers/jindra_engine/devs_controller.rb +4 -0
- data/app/controllers/jindra_engine/docs_controller.rb +59 -0
- data/app/controllers/jindra_engine/identities_controller.rb +7 -0
- data/app/controllers/jindra_engine/jinda_controller.rb +71 -0
- data/app/controllers/jindra_engine/notes_controller.rb +87 -0
- data/app/controllers/jindra_engine/password_resets.rb +30 -0
- data/app/controllers/jindra_engine/password_resets_controller.rb +35 -0
- data/app/controllers/jindra_engine/sessions_controller.rb +45 -0
- data/app/controllers/jindra_engine/sitemap_controller.rb +15 -0
- data/app/controllers/jindra_engine/users_controller.rb +35 -0
- data/app/helpers/jinda_engine/jinda_helper.rb +1005 -0
- data/app/jinda/index.mm +366 -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/app/mailers/jinda_engine/application_mailer.rb +4 -0
- data/app/mailers/jinda_engine/jinda_mailer.rb +7 -0
- data/app/mailers/jinda_engine/note_mailer.rb +10 -0
- data/app/mailers/jinda_engine/user_mailer.rb +15 -0
- data/app/views/jinda_engine/adminbsbs/content.haml +241 -0
- data/app/views/jinda_engine/admins/edit_role/edit_role.html.erb +7 -0
- data/app/views/jinda_engine/admins/edit_role/select_user.html.erb +4 -0
- data/app/views/jinda_engine/api/v1/note.haml +0 -0
- data/app/views/jinda_engine/articles/edit.haml +12 -0
- data/app/views/jinda_engine/articles/edit_article/edit_article.html.erb +13 -0
- data/app/views/jinda_engine/articles/edit_article/select_article.html.erb +12 -0
- data/app/views/jinda_engine/articles/index.haml +23 -0
- data/app/views/jinda_engine/articles/my.haml +20 -0
- data/app/views/jinda_engine/articles/new_article/form_article.html.erb +16 -0
- data/app/views/jinda_engine/articles/show.html.haml +25 -0
- data/app/views/jinda_engine/articles/xedit_article/edit_article.html.erb +13 -0
- data/app/views/jinda_engine/ctrs/vfolder1/viewfile1.html.erb +23 -0
- data/app/views/jinda_engine/ctrs/vfolder1/viewfile2.html.erb +23 -0
- data/app/views/jinda_engine/ctrs/vfolder2/viewfile2.html.erb +23 -0
- data/app/views/jinda_engine/custom/_adsense.haml +6 -0
- data/app/views/jinda_engine/docs/doc_edit/doc_edit.html.erb +21 -0
- data/app/views/jinda_engine/docs/doc_edit/doc_select.html.erb +14 -0
- data/app/views/jinda_engine/docs/doc_new/doc_form.html.erb +26 -0
- data/app/views/jinda_engine/docs/doc_new/doc_form.md +36 -0
- data/app/views/jinda_engine/docs/doc_xedit/doc_edit.html.erb +21 -0
- data/app/views/jinda_engine/docs/edit/select_note.html.erb +14 -0
- data/app/views/jinda_engine/docs/index.haml +21 -0
- data/app/views/jinda_engine/docs/my.haml +27 -0
- data/app/views/jinda_engine/identities/new.html.erb +32 -0
- data/app/views/jinda_engine/jinda/_activity.md +10 -0
- data/app/views/jinda_engine/jinda/_menu.haml +27 -0
- data/app/views/jinda_engine/jinda/_menu_mm.haml +44 -0
- data/app/views/jinda_engine/jinda/_model.md +5 -0
- data/app/views/jinda_engine/jinda/_modul.md +9 -0
- data/app/views/jinda_engine/jinda/_pending_home.haml +5 -0
- data/app/views/jinda_engine/jinda/_pending_page.haml +24 -0
- data/app/views/jinda_engine/jinda/_service.md +24 -0
- data/app/views/jinda_engine/jinda/_static.haml +13 -0
- data/app/views/jinda_engine/jinda/doc-thai.md +37 -0
- data/app/views/jinda_engine/jinda/doc.md +36 -0
- data/app/views/jinda_engine/jinda/error_logs.haml +22 -0
- data/app/views/jinda_engine/jinda/feed.rss.builder +27 -0
- data/app/views/jinda_engine/jinda/help.haml +20 -0
- data/app/views/jinda_engine/jinda/index.html.haml +53 -0
- data/app/views/jinda_engine/jinda/logs.haml +22 -0
- data/app/views/jinda_engine/jinda/notice_logs.haml +18 -0
- data/app/views/jinda_engine/jinda/pending.haml +1 -0
- data/app/views/jinda_engine/jinda/run_form.haml +42 -0
- data/app/views/jinda_engine/jinda/run_output.haml +38 -0
- data/app/views/jinda_engine/jinda/search.haml +20 -0
- data/app/views/jinda_engine/jinda/status.haml +61 -0
- data/app/views/jinda_engine/jinda_mailer/gmail.html.erb +9 -0
- data/app/views/jinda_engine/layouts/_head.html.erb +10 -0
- data/app/views/jinda_engine/layouts/_meta_tag.html.erb +19 -0
- data/app/views/jinda_engine/layouts/application.haml +4 -0
- data/app/views/jinda_engine/layouts/bsb/_footer.haml +7 -0
- data/app/views/jinda_engine/layouts/bsb/_header.haml +147 -0
- data/app/views/jinda_engine/layouts/bsb/_menu.haml +47 -0
- data/app/views/jinda_engine/layouts/bsb/_menu_mm.haml +34 -0
- data/app/views/jinda_engine/layouts/bsb/_rightbar.haml +123 -0
- data/app/views/jinda_engine/layouts/bsb/_sidebar.haml +155 -0
- data/app/views/jinda_engine/layouts/bsb/application.haml-bsb +47 -0
- data/app/views/jinda_engine/layouts/gmail.html.erb +9 -0
- data/app/views/jinda_engine/layouts/jqm/_full.haml +33 -0
- data/app/views/jinda_engine/layouts/jqm/_page.haml +16 -0
- data/app/views/jinda_engine/layouts/jqm/application.haml-jqm +4 -0
- data/app/views/jinda_engine/layouts/mailer.html.erb +13 -0
- data/app/views/jinda_engine/layouts/mailer.html.haml +3 -0
- data/app/views/jinda_engine/layouts/mailer.text.erb +1 -0
- data/app/views/jinda_engine/layouts/mailer.text.haml +1 -0
- data/app/views/jinda_engine/layouts/mobile.html.erb +13 -0
- data/app/views/jinda_engine/layouts/mobilejq.html.erb +31 -0
- data/app/views/jinda_engine/layouts/print.html.erb +22 -0
- data/app/views/jinda_engine/layouts/utf8.html.erb +22 -0
- data/app/views/jinda_engine/note_mailer/gmail.html.haml +7 -0
- data/app/views/jinda_engine/note_mailer/gmail.text.haml +8 -0
- data/app/views/jinda_engine/notes/delete/select_note.html.erb +14 -0
- data/app/views/jinda_engine/notes/edit/edit_note.html.erb +10 -0
- data/app/views/jinda_engine/notes/edit/select_note.html.erb +14 -0
- data/app/views/jinda_engine/notes/index.haml +71 -0
- data/app/views/jinda_engine/notes/mail/display_mail.html.erb +20 -0
- data/app/views/jinda_engine/notes/mail/select_note.html.erb +19 -0
- data/app/views/jinda_engine/notes/mail/show.html.haml +13 -0
- data/app/views/jinda_engine/notes/my.haml +21 -0
- data/app/views/jinda_engine/notes/new/new_note.html.erb +13 -0
- data/app/views/jinda_engine/notes/show.haml +10 -0
- data/app/views/jinda_engine/notes/xedit/edit_note.html.erb +10 -0
- data/app/views/jinda_engine/password_resets/edit.html.erb +21 -0
- data/app/views/jinda_engine/password_resets/new.html.erb +7 -0
- data/app/views/jinda_engine/sessions/new.html.erb +20 -0
- data/app/views/jinda_engine/sitemap/index.xml.haml +10 -0
- data/app/views/jinda_engine/user_mailer/password_reset.html.haml +3 -0
- data/app/views/jinda_engine/user_mailer/password_reset.text.erb +3 -0
- data/app/views/jinda_engine/user_mailer/password_reset.text.haml +3 -0
- data/app/views/jinda_engine/users/index.haml +13 -0
- data/app/views/jinda_engine/users/pwd/enter.html.erb +6 -0
- data/app/views/jinda_engine/users/user/enter_user.html.erb +8 -0
- data/config/application.rb +58 -0
- data/config/initializers/jinda_engine/assets.rb +14 -0
- data/config/initializers/jinda_engine/jinda.rb +13 -0
- data/config/initializers/jinda_engine/mongoid.rb +9 -0
- data/config/initializers/jinda_engine/mongoid.rb-org +9 -0
- data/config/initializers/jinda_engine/omniauth.rb-org +17 -0
- data/config/jinda_engine/cloudinary.yml +9 -0
- data/config/routes.rb +18 -0
- data/db/jinda_engine/seeds.rb +6 -0
- data/lib/generators/jinda_engine/USAGE +2 -0
- data/lib/generators/jinda_engine/config_generator.rb +95 -0
- data/lib/generators/jinda_engine/install_generator.rb +237 -0
- data/lib/generators/jinda_engine/minitest_generator.rb +30 -0
- data/lib/generators/jinda_engine/rspec_generator.rb +30 -0
- data/lib/generators/jinda_engine/templates/README.md +173 -0
- data/lib/generators/jinda_engine/templates/app/assets/config/manifest.js +4 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/4dcity-old.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/4dcity.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/account.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/add.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader-circle.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/anchor.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/application_double.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/application_form_edit.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_left.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_right.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_left.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_right.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/calendar.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cancel.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/chart_bar.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/clock.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cog.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/control_fastforward.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/control_play.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/cross.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/delete.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/external-link.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/facebook-continue-button.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/facebooksmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/favicon.ico +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/freemind(mm).png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/google-continue-button.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/help.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/highway-menu.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/highway.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/house.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logo.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logo_jinda.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/logout.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/new.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/new.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_attach.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_green.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_output.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/page_pdf.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/pencil.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/printer.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/refresh.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/report.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/rssmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/tick.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/twittersmall.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/user.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/user_admin_gear.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/images/view_code.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js +24 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js-jqm +27 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/cable.js +13 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/disable_enter_key.js +10 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll-wrapper.js +32 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll.js +1084 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jinda.js +14 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile-1.2.1.js +9272 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.datebox.js +1778 -0
- data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.splitview.js +695 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/app.scss +90 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/application.css.scss +34 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/articles.scss +94 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew.css +47 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/ajax-loader.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_blue.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_red.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-black.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-white.png +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/indicator.gif +0 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jinda.css +52 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile-1.2.1.css +2339 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.datebox.css +65 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.grids.collapsible.css +122 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.splitview.css +128 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.css +1516 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.min.css +11 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/modules.scss +84 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/sarabun.css +37 -0
- data/lib/generators/jinda_engine/templates/app/assets/stylesheets/social.scss +133 -0
- data/lib/generators/jinda_engine/templates/app/channels/application_cable/channel.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/channels/application_cable/connection.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/controllers/api/v1/notes_controller.rb +81 -0
- data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_general_concern.rb-org +179 -0
- data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_run_concern.rb-org +365 -0
- data/lib/generators/jinda_engine/templates/app/helpers/admins_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/application_helper.rb +33 -0
- data/lib/generators/jinda_engine/templates/app/helpers/articles_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/basic_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/comments_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/ctrs_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/devs_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/pictures_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/sitemap_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/helpers/users_helper.rb +2 -0
- data/lib/generators/jinda_engine/templates/app/jinda/index.mm +366 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/index.mm +366 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/linkview.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/jinda/template/view.html.erb +26 -0
- data/lib/generators/jinda_engine/templates/app/mailers/application_mailer.rb +4 -0
- data/lib/generators/jinda_engine/templates/app/mailers/jinda_mailer.rb +7 -0
- data/lib/generators/jinda_engine/templates/app/mailers/note_mailer.rb +10 -0
- data/lib/generators/jinda_engine/templates/app/mailers/user_mailer.rb +15 -0
- data/lib/generators/jinda_engine/templates/app/models/address.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/article.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/comment.rb +11 -0
- data/lib/generators/jinda_engine/templates/app/models/identity.rb +18 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/doc.rb +36 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/module.rb +11 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/notice.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/role.rb +8 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/runseq.rb +24 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/service.rb +17 -0
- data/lib/generators/jinda_engine/templates/app/models/jinda/xmain.rb +38 -0
- data/lib/generators/jinda_engine/templates/app/models/note.rb +22 -0
- data/lib/generators/jinda_engine/templates/app/models/param.rb +41 -0
- data/lib/generators/jinda_engine/templates/app/models/person.rb +14 -0
- data/lib/generators/jinda_engine/templates/app/models/user.rb +66 -0
- data/lib/generators/jinda_engine/templates/app/views/adminbsbs/content.haml +241 -0
- data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/edit_role.html.erb +7 -0
- data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/select_user.html.erb +4 -0
- data/lib/generators/jinda_engine/templates/app/views/api/v1/note.haml +0 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
- data/lib/generators/jinda_engine/templates/app/views/custom/_adsense.haml +6 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_select.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.html.erb +26 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.md +36 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/edit/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/index.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/views/docs/my.haml +27 -0
- data/lib/generators/jinda_engine/templates/app/views/identities/new.html.erb +32 -0
- data/lib/generators/jinda_engine/templates/app/views/jinda_mailer/gmail.html.erb +9 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/_head.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/_meta_tag.html.erb +19 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/application.haml +4 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_footer.haml +7 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_header.haml +147 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu.haml +47 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu_mm.haml +34 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_rightbar.haml +123 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_sidebar.haml +155 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/application.haml-bsb +47 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/gmail.html.erb +9 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_full.haml +33 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_page.haml +16 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/application.haml-jqm +4 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.erb +1 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.haml +1 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mobile.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/mobilejq.html.erb +31 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/print.html.erb +22 -0
- data/lib/generators/jinda_engine/templates/app/views/layouts/utf8.html.erb +22 -0
- data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.html.haml +7 -0
- data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.text.haml +8 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/delete/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/edit/edit_note.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/edit/select_note.html.erb +14 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/index.haml +71 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/display_mail.html.erb +20 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/select_note.html.erb +19 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/mail/show.html.haml +13 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/my.haml +21 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/new/new_note.html.erb +13 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/show.haml +10 -0
- data/lib/generators/jinda_engine/templates/app/views/notes/xedit/edit_note.html.erb +10 -0
- data/lib/generators/jinda_engine/templates/app/views/password_resets/edit.html.erb +21 -0
- data/lib/generators/jinda_engine/templates/app/views/password_resets/new.html.erb +7 -0
- data/lib/generators/jinda_engine/templates/app/views/sessions/new.html.erb +20 -0
- data/lib/generators/jinda_engine/templates/app/views/sitemap/index.xml.haml +10 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.html.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.erb +3 -0
- data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.haml +3 -0
- data/lib/generators/jinda_engine/templates/app/views/users/index.haml +13 -0
- data/lib/generators/jinda_engine/templates/app/views/users/pwd/enter.html.erb +6 -0
- data/lib/generators/jinda_engine/templates/app/views/users/user/enter_user.html.erb +8 -0
- data/lib/generators/jinda_engine/templates/config/cloudinary.yml +9 -0
- data/lib/generators/jinda_engine/templates/db/seeds.rb +6 -0
- data/lib/generators/jinda_engine/templates/dot/dot.env +2 -0
- data/lib/generators/jinda_engine/templates/dotrspec +3 -0
- data/lib/generators/jinda_engine/templates/jinda.yml +10 -0
- data/lib/generators/jinda_engine/templates/public/404.html +67 -0
- data/lib/generators/jinda_engine/templates/public/422.html +67 -0
- data/lib/generators/jinda_engine/templates/public/500.html +66 -0
- data/lib/generators/jinda_engine/templates/public/assets/images/logo.png +0 -0
- data/lib/generators/jinda_engine/templates/public/favicon.ico +0 -0
- data/lib/generators/jinda_engine/templates/public/robots.txt +3 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_index_spec.rb +23 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_my_spec.rb +14 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_post_spec.rb +19 -0
- data/lib/generators/jinda_engine/templates/spec/controllers/sessions_controller_spec.rb +96 -0
- data/lib/generators/jinda_engine/templates/spec/features/userlogins_spec.rb +23 -0
- data/lib/generators/jinda_engine/templates/spec/mailers/note_spec.rb +24 -0
- data/lib/generators/jinda_engine/templates/spec/mailers/previews/note_preview.rb +9 -0
- data/lib/generators/jinda_engine/templates/spec/models/note_spec.rb +41 -0
- data/lib/generators/jinda_engine/templates/spec/models/user_spec.rb +12 -0
- data/lib/generators/jinda_engine/templates/spec/rails_helper.rb +44 -0
- data/lib/generators/jinda_engine/templates/spec/spec_helper.rb +77 -0
- data/lib/generators/jinda_engine/templates/spec/support/authentication_helper.rb +20 -0
- data/lib/generators/jinda_engine/templates/spec/support/factory_bot.rb +12 -0
- data/lib/generators/jinda_engine/templates/spec/support/omniauth_macros.rb +38 -0
- data/lib/generators/jinda_engine/templates/spec/support/request_spec_helper.rb +8 -0
- data/lib/generators/jinda_engine/templates/spec/views/articles/_article.html.erb_spec.rbx +14 -0
- data/lib/generators/jinda_engine/templates/test/application_system_test_case.rb +5 -0
- data/lib/generators/jinda_engine/templates/test/integration/jinda_routes_test.rb +42 -0
- data/lib/generators/jinda_engine/templates/test/test_helper.rb +6 -0
- data/lib/jinda_engine.rb +7 -0
- data/lib/jinda_engine/engine.rb +6 -0
- data/lib/jinda_engine/gemhelpers.rb +50 -0
- data/lib/jinda_engine/helpers.rb +1005 -0
- data/lib/jinda_engine/version.rb +3 -0
- data/lib/tasks/jinda_engine.rake +33 -0
- metadata +1203 -0
@@ -0,0 +1,365 @@
|
|
1
|
+
module JindaRunConcern
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
def run_form
|
5
|
+
init_vars(params[:id])
|
6
|
+
if authorize?
|
7
|
+
if ['F', 'X'].include? @xmain.status
|
8
|
+
redirect_to_root
|
9
|
+
else
|
10
|
+
service= @xmain.service
|
11
|
+
###############################################################################################
|
12
|
+
# Run View Form f created template by jinda rake follow freemind mm file
|
13
|
+
###############################################################################################
|
14
|
+
if service
|
15
|
+
@title= "Transaction ID #{@xmain.xid}: #{@xmain.name} / #{@runseq.name}"
|
16
|
+
fhelp= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.md"
|
17
|
+
###############################################################################################
|
18
|
+
# Check if help file available for this form
|
19
|
+
###############################################################################################
|
20
|
+
@help = File.read(fhelp) if File.exists?(fhelp)
|
21
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
22
|
+
if File.file?(f)
|
23
|
+
@ui= File.read(f)
|
24
|
+
else
|
25
|
+
# flash[:notice]= "Error: Can not find the view file for this controller"
|
26
|
+
ma_log "Error: Can not find the view file for this controller"
|
27
|
+
redirect_to_root
|
28
|
+
end
|
29
|
+
end
|
30
|
+
init_vars(params[:id])
|
31
|
+
end
|
32
|
+
else
|
33
|
+
redirect_to_root
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def run_if
|
38
|
+
init_vars(params[:id])
|
39
|
+
condition= eval(@runseq.code).to_s
|
40
|
+
match_found= false
|
41
|
+
if condition
|
42
|
+
xml= REXML::Document.new(@runseq.xml).root
|
43
|
+
next_runseq= nil
|
44
|
+
text = xml.elements['//node/node'].attributes['TEXT']
|
45
|
+
match, name= text.split(':',2)
|
46
|
+
label= name2code(name.strip)
|
47
|
+
if condition==match
|
48
|
+
if label=="end"
|
49
|
+
@end_job= true
|
50
|
+
else
|
51
|
+
next_runseq= @xmain.runseqs.where(:code=> label, :action.ne=>'redirect').first
|
52
|
+
match_found= true if next_runseq
|
53
|
+
@runseq_not_f= false
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
unless match_found || @end_job
|
58
|
+
next_runseq= @xmain.runseqs.where( rstep:(@xvars['current_step']+1) ).first
|
59
|
+
end
|
60
|
+
end_action(next_runseq)
|
61
|
+
end
|
62
|
+
|
63
|
+
# redirect when finish last runseq
|
64
|
+
# eg: http://localhost:3000/notes/my
|
65
|
+
def run_direct_to
|
66
|
+
init_vars(params[:id])
|
67
|
+
next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first
|
68
|
+
if !@runseq.code.blank?
|
69
|
+
@xvars['p']['return'] = @runseq.code
|
70
|
+
else
|
71
|
+
flash[:notice]= "Error: missing required forward path in Freemind"
|
72
|
+
ma_log "Error: require forward path in Freemind"
|
73
|
+
end
|
74
|
+
end_action(next_runseq)
|
75
|
+
end
|
76
|
+
|
77
|
+
def run_redirect
|
78
|
+
init_vars(params[:id])
|
79
|
+
# next_runseq= @xmain.runseqs.first :conditions=>["id != ? AND code = ?",@runseq.id, @runseq.code]
|
80
|
+
next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first
|
81
|
+
@xmain.current_runseq= next_runseq.id
|
82
|
+
end_action(next_runseq)
|
83
|
+
end
|
84
|
+
|
85
|
+
# call controller to do the freemind task using Star symbol eg: Update
|
86
|
+
# not for run_form
|
87
|
+
def run_do
|
88
|
+
init_vars(params[:id])
|
89
|
+
@runseq.start ||= Time.now
|
90
|
+
@runseq.status= 'R' # running
|
91
|
+
$runseq_id= @runseq.id
|
92
|
+
$user_id= current_ma_user.try(:id)
|
93
|
+
# $xmain, $runseq, $user, $xvars, $ip from local
|
94
|
+
set_global
|
95
|
+
controller = Kernel.const_get(@xvars['custom_controller']).new
|
96
|
+
result = controller.send(@runseq.code)
|
97
|
+
# save local var to database
|
98
|
+
init_vars_by_runseq($runseq_id)
|
99
|
+
@xvars = $xvars
|
100
|
+
@xvars[@runseq.code.to_sym]= result.to_s
|
101
|
+
@xvars['current_step']= @runseq.rstep
|
102
|
+
@runseq.status= 'F' #finish
|
103
|
+
@runseq.stop= Time.now
|
104
|
+
@runseq.save
|
105
|
+
end_action
|
106
|
+
rescue => e
|
107
|
+
@xmain.status='E'
|
108
|
+
@xvars['error']= e.to_s+e.backtrace.to_s
|
109
|
+
@xmain.xvars= $xvars
|
110
|
+
@xmain.save
|
111
|
+
@runseq.status= 'F' #finish
|
112
|
+
@runseq.stop= Time.now
|
113
|
+
@runseq.save
|
114
|
+
refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}"
|
115
|
+
end
|
116
|
+
|
117
|
+
def run_list
|
118
|
+
init_vars(params[:id])
|
119
|
+
service= @xmain.service
|
120
|
+
# disp= get_option("display")
|
121
|
+
# disp = Nil or :"??????"
|
122
|
+
# get option from last node: rule, role, display
|
123
|
+
disp= get_option("display")
|
124
|
+
# change from Nil to false and string to true
|
125
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
126
|
+
# Todo check if file is available
|
127
|
+
# if service and file exist
|
128
|
+
# ma_display from disp of 3rd level node as rule, role, display
|
129
|
+
if service && !@runseq.code.blank?
|
130
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
131
|
+
@ui= File.read(f)
|
132
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
133
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
134
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
135
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
136
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
137
|
+
:ma_secured => @xmain.service.ma_secured,
|
138
|
+
:filename => "#{@runseq.code}.html.erb"
|
139
|
+
else
|
140
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
141
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
142
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
143
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
144
|
+
:ma_secured => @xmain.service.ma_secured,
|
145
|
+
:filename => "#{@runseq.code}.html.erb"
|
146
|
+
end
|
147
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
148
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
149
|
+
@message = "Finish" if @runseq.end
|
150
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
151
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
152
|
+
else
|
153
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
154
|
+
ma_log "Error: Can not find the view file for this controller"
|
155
|
+
redirect_to_root
|
156
|
+
end
|
157
|
+
# Check if ma_display available
|
158
|
+
# ma_display= get_option("display")
|
159
|
+
# if not ma_display then no display both controller-view and content then end back to root
|
160
|
+
unless ma_display
|
161
|
+
end_action
|
162
|
+
end
|
163
|
+
# controller display from @ui
|
164
|
+
end
|
165
|
+
|
166
|
+
def run_folder
|
167
|
+
init_vars(params[:id])
|
168
|
+
service= @xmain.service
|
169
|
+
# disp= get_option("display")
|
170
|
+
# disp = Nil or :"??????"
|
171
|
+
disp= get_option("display")
|
172
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
173
|
+
# Todo check if file is available
|
174
|
+
# if service and file exist
|
175
|
+
if service && !@runseq.code.blank?
|
176
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
177
|
+
@ui= File.read(f)
|
178
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
179
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
180
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
181
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
182
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
183
|
+
:ma_secured => @xmain.service.ma_secured,
|
184
|
+
:filename => "#{@runseq.code}.html.erb"
|
185
|
+
else
|
186
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
187
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
188
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
189
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
190
|
+
:ma_secured => @xmain.service.ma_secured,
|
191
|
+
:filename => "#{@runseq.code}.html.erb"
|
192
|
+
end
|
193
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
194
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
195
|
+
@message = "Finish" if @runseq.end
|
196
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
197
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
198
|
+
else
|
199
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
200
|
+
ma_log "Error: Can not find the view file for this controller"
|
201
|
+
redirect_to_root
|
202
|
+
end
|
203
|
+
# Check if ma_display available
|
204
|
+
# ma_display= get_option("display")
|
205
|
+
unless ma_display
|
206
|
+
end_action
|
207
|
+
end
|
208
|
+
# controller display from @ui
|
209
|
+
end
|
210
|
+
|
211
|
+
def run_output
|
212
|
+
init_vars(params[:id])
|
213
|
+
service= @xmain.service
|
214
|
+
# disp= get_option("display")
|
215
|
+
# disp = Nil or :"??????"
|
216
|
+
disp= get_option("display")
|
217
|
+
ma_display = (disp && !affirm(disp)) ? false : true
|
218
|
+
# Todo check if file is available
|
219
|
+
# if service and file exist
|
220
|
+
if service && !@runseq.code.blank?
|
221
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
222
|
+
@ui= File.read(f)
|
223
|
+
if Jinda::Doc.where(:runseq_id=>@runseq.id).exists?
|
224
|
+
@doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first
|
225
|
+
@doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
226
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
227
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
228
|
+
:ma_secured => @xmain.service.ma_secured,
|
229
|
+
:filename => "#{@runseq.code}.html.erb"
|
230
|
+
else
|
231
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
232
|
+
:content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"),
|
233
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
234
|
+
:ip=> get_ip, :service=>service, :ma_display=>ma_display,
|
235
|
+
:ma_secured => @xmain.service.ma_secured,
|
236
|
+
:filename => "#{@runseq.code}.html.erb"
|
237
|
+
end
|
238
|
+
# @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >"
|
239
|
+
@message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>"
|
240
|
+
@message = "Finish" if @runseq.end
|
241
|
+
ma_log("Todo defined?(NSG_NEXT : Next >>)")
|
242
|
+
eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
243
|
+
else
|
244
|
+
flash[:notice]= "Error: Can not find the view file for this controller"
|
245
|
+
ma_log "Error: Can not find the view file for this controller"
|
246
|
+
redirect_to_root
|
247
|
+
end
|
248
|
+
# Check if ma_display available
|
249
|
+
# ma_display= get_option("display")
|
250
|
+
unless ma_display
|
251
|
+
end_action
|
252
|
+
end
|
253
|
+
# controller display from @ui
|
254
|
+
end
|
255
|
+
|
256
|
+
def run_mail
|
257
|
+
init_vars(params[:id])
|
258
|
+
service= @xmain.service
|
259
|
+
f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb"
|
260
|
+
@ui= File.read(f).html_safe
|
261
|
+
@doc= Jinda::Doc.create :name=> @runseq.name,
|
262
|
+
:content_type=>"mail", :data_text=> render_to_string(:inline=>@ui, :layout=>false),
|
263
|
+
:xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user,
|
264
|
+
:ip=> get_ip, :service=>service, :ma_display=>false,
|
265
|
+
:ma_secured => @xmain.service.ma_secured
|
266
|
+
eval "@xvars[:#{@runseq.code}] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)"
|
267
|
+
mail_from = get_option('from')
|
268
|
+
# sender= render_to_string(:inline=>mail_from) if mail_from
|
269
|
+
mail_to = get_option('to')
|
270
|
+
recipients= render_to_string(:inline=>mail_to) if mail_to
|
271
|
+
mail_subject = get_option('subject')
|
272
|
+
subject= render_to_string(:inline=>mail_subject) || "#{@runseq.name}"
|
273
|
+
JindaMailer.gmail(@doc.data_text, recipients, subject).deliver unless DONT_SEND_MAIL
|
274
|
+
end_action
|
275
|
+
end
|
276
|
+
|
277
|
+
def end_output
|
278
|
+
init_vars(params[:xmain_id])
|
279
|
+
end_action
|
280
|
+
end
|
281
|
+
|
282
|
+
# Store params to @xvars[@runseq]
|
283
|
+
# Perform task from the form input eg: attach file
|
284
|
+
# replace end_action (for form)
|
285
|
+
# Store params attach file to @xvars to use in get_image
|
286
|
+
def end_form
|
287
|
+
if params[:xmain_id]
|
288
|
+
init_vars(params[:xmain_id])
|
289
|
+
else
|
290
|
+
ma_log "Known Bug : repeated end_form "
|
291
|
+
redirect_to_root and return
|
292
|
+
end
|
293
|
+
eval "@xvars[@runseq.code] = {} unless @xvars[@runseq.code]"
|
294
|
+
# Search for uploaded file name if exist
|
295
|
+
params.each { |k,v|
|
296
|
+
if params[k].respond_to? :original_filename
|
297
|
+
get_image(k, params[k])
|
298
|
+
# check if params of array in form eg: edit_article
|
299
|
+
elsif params[k].is_a?(ActionController::Parameters)
|
300
|
+
eval "@xvars[@runseq.code][k] = {} unless @xvars[@runseq.code][k]"
|
301
|
+
params[k].each { |k1,v1|
|
302
|
+
# eval "@xvars[@runseq.code][k1] = params.require(k1).permit(k1)"
|
303
|
+
eval "@xvars[@runseq.code][k][k1] = v1"
|
304
|
+
next unless v1.respond_to?(:original_filename)
|
305
|
+
doc = {}
|
306
|
+
get_image1(k, k1, params[k][k1])
|
307
|
+
}
|
308
|
+
else
|
309
|
+
# No file attached
|
310
|
+
#
|
311
|
+
# https://stackoverflow.com/questions/34949505/rails-5-unable-to- retrieve-hash-values-from-parameter # bug in to_unsalfe_h rails 5.1.6 https://github.com/getsentry/raven-ruby/issues/799
|
312
|
+
# Solution:
|
313
|
+
# https://stackoverflow.com/questions/34949505/rails-5-unable-to-retrieve-hash-values-from-parameter
|
314
|
+
# v = v.to_unsafe_h unless v.class == String
|
315
|
+
# v = params.require[k] unless v.class == String
|
316
|
+
v = v.to_s unless v.class == String
|
317
|
+
# Create @xvars[@runseq.code]
|
318
|
+
eval "@xvars[@runseq.code][k] = v"
|
319
|
+
end
|
320
|
+
}
|
321
|
+
end_action
|
322
|
+
rescue => e
|
323
|
+
@xmain.status='E'
|
324
|
+
@xvars['error']= e.to_s+e.backtrace.to_s
|
325
|
+
@xmain.xvars= $xvars
|
326
|
+
@xmain.save
|
327
|
+
@runseq.status= 'F' #finish
|
328
|
+
@runseq.stop= Time.now
|
329
|
+
@runseq.save
|
330
|
+
ma_log "Error:end_form "
|
331
|
+
refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}"
|
332
|
+
end
|
333
|
+
|
334
|
+
def end_action(next_runseq = nil)
|
335
|
+
# not for form
|
336
|
+
# @runseq.status='F' unless @runseq_not_f
|
337
|
+
@xmain.xvars= @xvars
|
338
|
+
@xmain.status= 'R' # running
|
339
|
+
@xmain.save!
|
340
|
+
@runseq.status='F'
|
341
|
+
@runseq.user= current_ma_user
|
342
|
+
@runseq.stop= Time.now
|
343
|
+
@runseq.save
|
344
|
+
next_runseq= @xmain.runseqs.where(:rstep=> @runseq.rstep+1).first unless next_runseq
|
345
|
+
if @end_job || !next_runseq # job finish
|
346
|
+
@xmain.xvars= @xvars
|
347
|
+
@xmain.status= 'F' unless @xmain.status== 'E' # finish
|
348
|
+
@xmain.stop= Time.now
|
349
|
+
@xmain.save
|
350
|
+
if @xvars['p']['return']
|
351
|
+
redirect_to @xvars['p']['return'] and return
|
352
|
+
else
|
353
|
+
if @user
|
354
|
+
redirect_to :action=>'index' and return
|
355
|
+
else
|
356
|
+
redirect_to_root and return
|
357
|
+
end
|
358
|
+
end
|
359
|
+
else
|
360
|
+
@xmain.update_attribute :current_runseq, next_runseq.id
|
361
|
+
redirect_to :action=>'run', :id=>@xmain.id and return
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module ApplicationHelper
|
2
|
+
|
3
|
+
def title(blog_title)
|
4
|
+
content_for(:title) { blog_title }
|
5
|
+
end
|
6
|
+
|
7
|
+
def meta_description(blog_text)
|
8
|
+
content_for(:meta_description) { blog_text }
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'redcarpet'
|
12
|
+
require 'rouge'
|
13
|
+
require 'rouge/plugins/redcarpet'
|
14
|
+
|
15
|
+
class CodeRayify < Redcarpet::Render::HTML
|
16
|
+
def block_code(code, language)
|
17
|
+
CodeRay.scan(code, language).div
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def markdown(text)
|
22
|
+
coderayified = CodeRayify.new(:filter_html => true,
|
23
|
+
:hard_wrap => true)
|
24
|
+
options = {
|
25
|
+
:fenced_code_blocks => true,
|
26
|
+
:no_intra_emphasis => true,
|
27
|
+
:autolink => true,
|
28
|
+
:lax_html_blocks => true,
|
29
|
+
}
|
30
|
+
markdown_to_html = Redcarpet::Markdown.new(coderayified, options)
|
31
|
+
markdown_to_html.render(text).html_safe
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,366 @@
|
|
1
|
+
<map version="1.0.1">
|
2
|
+
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
|
3
|
+
<node CREATED="1273819432637" ID="ID_1098419600" MODIFIED="1334737006485" TEXT="Jinda">
|
4
|
+
<node CREATED="1273819462973" ID="ID_282419531" MODIFIED="1589756758387" POSITION="right" TEXT="services">
|
5
|
+
<node CREATED="1275756501221" FOLDED="true" ID="ID_1720745721" MODIFIED="1583097151076" TEXT="users:User">
|
6
|
+
<node CREATED="1278491598711" ID="ID_1662699954" MODIFIED="1494393920347" TEXT="role:m"/>
|
7
|
+
<node CREATED="1279700865182" ID="ID_1266797279" MODIFIED="1357798847781" TEXT="link:info: /users"/>
|
8
|
+
<node CREATED="1319015338880" ID="ID_189841353" MODIFIED="1528215866339" TEXT="link:pending tasks: /jinda/pending"/>
|
9
|
+
<node CREATED="1275905802131" ID="ID_154000410" MODIFIED="1355422418892" TEXT="user:edit">
|
10
|
+
<node CREATED="1275756515843" ID="ID_1108188320" MODIFIED="1330477833918" TEXT="enter_user:edit">
|
11
|
+
<icon BUILTIN="attach"/>
|
12
|
+
<node CREATED="1282816887988" ID="ID_1767357871" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
13
|
+
</node>
|
14
|
+
<node CREATED="1275756530989" ID="ID_1221806432" MODIFIED="1282822205361" TEXT="update_user">
|
15
|
+
<icon BUILTIN="bookmark"/>
|
16
|
+
</node>
|
17
|
+
</node>
|
18
|
+
<node CREATED="1275756504750" ID="ID_1382277695" MODIFIED="1355422424108" TEXT="pwd:change password">
|
19
|
+
<node CREATED="1275756515843" ID="ID_1559014937" MODIFIED="1330477842311" TEXT="enter: edit">
|
20
|
+
<icon BUILTIN="attach"/>
|
21
|
+
<node CREATED="1282816887988" ID="ID_2948144" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
22
|
+
</node>
|
23
|
+
<node CREATED="1275756530989" ID="ID_1566171053" MODIFIED="1275756553762" TEXT="change_password">
|
24
|
+
<icon BUILTIN="bookmark"/>
|
25
|
+
</node>
|
26
|
+
</node>
|
27
|
+
</node>
|
28
|
+
<node CREATED="1275752678377" ID="ID_1348489452" MODIFIED="1588883079396" TEXT="admins:Admin">
|
29
|
+
<node CREATED="1275752688167" ID="ID_229996461" MODIFIED="1275752690948" TEXT="role:a"/>
|
30
|
+
<node CREATED="1282722836614" ID="ID_1213363124" MODIFIED="1330477902602" TEXT="edit_role:edit user role">
|
31
|
+
<node CREATED="1282722862918" ID="ID_1190117882" MODIFIED="1330477922159" TEXT="select_user:select user">
|
32
|
+
<icon BUILTIN="attach"/>
|
33
|
+
<node CREATED="1282722901932" ID="ID_1859523490" MODIFIED="1282722903469" TEXT="role:a"/>
|
34
|
+
</node>
|
35
|
+
<node CREATED="1282722868801" ID="ID_1325872490" MODIFIED="1330477926538" TEXT="edit_role:edit role">
|
36
|
+
<icon BUILTIN="attach"/>
|
37
|
+
<node CREATED="1282722901932" ID="ID_1992100954" MODIFIED="1282722903469" TEXT="role:a"/>
|
38
|
+
</node>
|
39
|
+
<node CREATED="1282722907306" ID="ID_1709875397" MODIFIED="1282722922669" TEXT="update_role">
|
40
|
+
<icon BUILTIN="bookmark"/>
|
41
|
+
</node>
|
42
|
+
</node>
|
43
|
+
<node CREATED="1273913393454" ID="ID_1088166839" MODIFIED="1511159690490" TEXT="link: pending tasks: /jinda/pending"/>
|
44
|
+
<node CREATED="1275790679363" ID="ID_829325467" MODIFIED="1511159696044" TEXT="link: logs: /jinda/logs"/>
|
45
|
+
<node CREATED="1507573166973" ID="ID_351025910" MODIFIED="1511159700908" TEXT="link: docs: /jinda/doc"/>
|
46
|
+
</node>
|
47
|
+
<node CREATED="1273706796854" ID="ID_1003882979" MODIFIED="1588964401951" TEXT="devs: Developer">
|
48
|
+
<node CREATED="1275373154914" ID="ID_340725299" MODIFIED="1275373158632" TEXT="role:d"/>
|
49
|
+
<node CREATED="1275788317299" ID="ID_716276608" MODIFIED="1511159716471" TEXT="link: error_logs: /jinda/error_logs"/>
|
50
|
+
<node CREATED="1275788317299" ID="ID_1570419198" MODIFIED="1587858894833" TEXT="link: notice_logs: /jinda/notice_logs"/>
|
51
|
+
</node>
|
52
|
+
<node CREATED="1589756777499" FOLDED="true" ID="ID_853155456" MODIFIED="1592785016438" TEXT="docs: Document">
|
53
|
+
<node CREATED="1589757073388" ID="ID_1938238774" MODIFIED="1589772640862" TEXT="link: My Document: /docs/my">
|
54
|
+
<node CREATED="1589757125861" ID="ID_521286668" MODIFIED="1589757136547" TEXT="role:m"/>
|
55
|
+
</node>
|
56
|
+
<node CREATED="1589756879955" ID="ID_899042293" MODIFIED="1589910229085" TEXT="doc_new: New Document">
|
57
|
+
<node CREATED="1589756946117" ID="ID_1840278804" MODIFIED="1589910235469" TEXT="doc_form: Doc Form">
|
58
|
+
<icon BUILTIN="attach"/>
|
59
|
+
<node CREATED="1589757054618" ID="ID_642998203" MODIFIED="1589757059003" TEXT="role: m"/>
|
60
|
+
</node>
|
61
|
+
<node CREATED="1589757264764" ID="ID_1352102524" MODIFIED="1589772413612" TEXT="doc_update: Doc update">
|
62
|
+
<icon BUILTIN="bookmark"/>
|
63
|
+
</node>
|
64
|
+
</node>
|
65
|
+
<node CREATED="1493419562726" ID="ID_339628868" MODIFIED="1590424956484" TEXT="doc_edit: Edit Document">
|
66
|
+
<icon BUILTIN="button_cancel"/>
|
67
|
+
<node CREATED="1493419577933" ID="ID_801950372" MODIFIED="1590180699851" TEXT="doc_select: Select Document">
|
68
|
+
<icon BUILTIN="attach"/>
|
69
|
+
<node CREATED="1493479602815" ID="ID_761787946" MODIFIED="1493479606921" TEXT="role:m"/>
|
70
|
+
</node>
|
71
|
+
<node CREATED="1493419612720" ID="ID_1190499756" MODIFIED="1590180735204" TEXT="doc_edit: Edit Document">
|
72
|
+
<icon BUILTIN="attach"/>
|
73
|
+
<node CREATED="1493479557266" ID="ID_1216426484" MODIFIED="1493479561055" TEXT="role:m"/>
|
74
|
+
</node>
|
75
|
+
<node CREATED="1581400438157" ID="ID_447781815" MODIFIED="1590180242343" TEXT="doc_update: Doc_update">
|
76
|
+
<icon BUILTIN="bookmark"/>
|
77
|
+
</node>
|
78
|
+
</node>
|
79
|
+
<node CREATED="1495246388313" ID="ID_278169779" MODIFIED="1590180135106" TEXT="doc_xedit: Doc_hidden_menu">
|
80
|
+
<icon BUILTIN="button_cancel"/>
|
81
|
+
<node CREATED="1493419612720" ID="ID_541432768" MODIFIED="1590180160498" TEXT="doc_edit: Edit">
|
82
|
+
<icon BUILTIN="attach"/>
|
83
|
+
<node CREATED="1493479557266" ID="ID_1339913531" MODIFIED="1493479561055" TEXT="role:m"/>
|
84
|
+
</node>
|
85
|
+
<node CREATED="1581400438157" ID="ID_802199910" MODIFIED="1590180242343" TEXT="doc_update: Doc_update">
|
86
|
+
<icon BUILTIN="bookmark"/>
|
87
|
+
</node>
|
88
|
+
</node>
|
89
|
+
</node>
|
90
|
+
<node CREATED="1493393619430" ID="ID_554831343" MODIFIED="1592926786394" TEXT="notes: Notes">
|
91
|
+
<node CREATED="1493489768542" ID="ID_737469676" MODIFIED="1589772615102" TEXT="link:My Notes: /notes/my">
|
92
|
+
<node CREATED="1493490295677" ID="ID_514416082" MODIFIED="1493490302239" TEXT="role:m"/>
|
93
|
+
</node>
|
94
|
+
<node CREATED="1493419257021" ID="ID_553734932" MODIFIED="1591278856955" TEXT="new: New Note">
|
95
|
+
<node CREATED="1493419299004" ID="ID_723334321" MODIFIED="1581351169990" TEXT="new_note: New ">
|
96
|
+
<icon BUILTIN="attach"/>
|
97
|
+
<node CREATED="1493479075294" ID="ID_1009521360" MODIFIED="1493479079687" TEXT="role:m"/>
|
98
|
+
</node>
|
99
|
+
<node CREATED="1493419491125" ID="ID_1125779183" MODIFIED="1581180747700" TEXT="create: Create">
|
100
|
+
<icon BUILTIN="bookmark"/>
|
101
|
+
</node>
|
102
|
+
<node CREATED="1591278861459" ID="ID_985992723" MODIFIED="1591319329198" TEXT="/notes/my">
|
103
|
+
<arrowlink DESTINATION="ID_985992723" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_650435572" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
104
|
+
<linktarget COLOR="#b0b0b0" DESTINATION="ID_985992723" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_650435572" SOURCE="ID_985992723" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
105
|
+
<icon BUILTIN="forward"/>
|
106
|
+
</node>
|
107
|
+
</node>
|
108
|
+
<node CREATED="1493419562726" FOLDED="true" ID="ID_1241171950" MODIFIED="1591278847249" TEXT="edit: Edit">
|
109
|
+
<node CREATED="1493419577933" ID="ID_1790163920" MODIFIED="1581350888992" TEXT="select_note: Select">
|
110
|
+
<icon BUILTIN="attach"/>
|
111
|
+
<node CREATED="1493479602815" ID="ID_1289003986" MODIFIED="1493479606921" TEXT="role:m"/>
|
112
|
+
</node>
|
113
|
+
<node CREATED="1493419612720" ID="ID_938262436" MODIFIED="1581350996674" TEXT="edit_note: Edit">
|
114
|
+
<icon BUILTIN="attach"/>
|
115
|
+
<node CREATED="1493479557266" ID="ID_211108947" MODIFIED="1493479561055" TEXT="role:m"/>
|
116
|
+
</node>
|
117
|
+
<node CREATED="1493419735921" ID="ID_1581002301" MODIFIED="1581180869775" TEXT="update: Update">
|
118
|
+
<icon BUILTIN="bookmark"/>
|
119
|
+
</node>
|
120
|
+
</node>
|
121
|
+
<node CREATED="1495246388313" FOLDED="true" ID="ID_320521408" MODIFIED="1591278851391" STYLE="fork" TEXT="delete:Delete">
|
122
|
+
<edge COLOR="#808080" STYLE="bezier" WIDTH="thin"/>
|
123
|
+
<node CREATED="1493419577933" ID="ID_1631275659" MODIFIED="1581350942681" TEXT="select_note: Select">
|
124
|
+
<icon BUILTIN="attach"/>
|
125
|
+
<node CREATED="1493479602815" ID="ID_851238107" MODIFIED="1493479606921" TEXT="role:m"/>
|
126
|
+
</node>
|
127
|
+
<node CREATED="1495246466176" ID="ID_1347765598" MODIFIED="1581799929028" TEXT="delete: Delete">
|
128
|
+
<icon BUILTIN="bookmark"/>
|
129
|
+
</node>
|
130
|
+
</node>
|
131
|
+
<node CREATED="1581531446494" FOLDED="true" ID="ID_1325232876" MODIFIED="1591278853597" TEXT="mail: Mail">
|
132
|
+
<node CREATED="1493419577933" FOLDED="true" ID="ID_1817148049" MODIFIED="1581531563343" TEXT="select_note: Select">
|
133
|
+
<icon BUILTIN="attach"/>
|
134
|
+
<node CREATED="1493479602815" ID="ID_1650154281" MODIFIED="1493479606921" TEXT="role:m"/>
|
135
|
+
</node>
|
136
|
+
<node CREATED="1581531468872" ID="ID_379926448" MODIFIED="1581564690354" TEXT="display_mail: Dsiplay Mail">
|
137
|
+
<icon BUILTIN="attach"/>
|
138
|
+
</node>
|
139
|
+
<node CREATED="1581564346466" ID="ID_1981382192" MODIFIED="1581564388041" TEXT="mail: Mail">
|
140
|
+
<icon BUILTIN="bookmark"/>
|
141
|
+
</node>
|
142
|
+
</node>
|
143
|
+
<node CREATED="1495246388313" FOLDED="true" ID="ID_807216843" MODIFIED="1590180066630" TEXT="xedit: Future use">
|
144
|
+
<icon BUILTIN="button_cancel"/>
|
145
|
+
<node CREATED="1493419612720" ID="ID_6864095" MODIFIED="1584999031935" TEXT="edit_note: Edit">
|
146
|
+
<icon BUILTIN="attach"/>
|
147
|
+
<node CREATED="1493479557266" ID="ID_297597260" MODIFIED="1493479561055" TEXT="role:m"/>
|
148
|
+
</node>
|
149
|
+
<node CREATED="1581400438157" ID="ID_1206027492" MODIFIED="1581400464170" TEXT="update: Update">
|
150
|
+
<icon BUILTIN="bookmark"/>
|
151
|
+
</node>
|
152
|
+
</node>
|
153
|
+
</node>
|
154
|
+
<node CREATED="1493393619430" ID="ID_328863650" MODIFIED="1592785024002" TEXT="articles: Article">
|
155
|
+
<node CREATED="1493419096527" ID="ID_1521905276" MODIFIED="1493478060121" TEXT="link: All Articles: /articles"/>
|
156
|
+
<node CREATED="1493489768542" FOLDED="true" ID="ID_1376361427" MODIFIED="1589757167952" TEXT="link: My article: /articles/my">
|
157
|
+
<node CREATED="1493490295677" ID="ID_628476988" MODIFIED="1493490302239" TEXT="role:m"/>
|
158
|
+
</node>
|
159
|
+
<node CREATED="1493419257021" ID="ID_1355420049" MODIFIED="1588619429446" TEXT="new_article: New Article">
|
160
|
+
<node CREATED="1493419299004" ID="ID_1468250197" MODIFIED="1493419428686" TEXT="form_article: New Article">
|
161
|
+
<icon BUILTIN="attach"/>
|
162
|
+
<node CREATED="1493479075294" ID="ID_1145618514" MODIFIED="1493479079687" TEXT="role:m"/>
|
163
|
+
</node>
|
164
|
+
<node CREATED="1493419491125" ID="ID_1687683396" MODIFIED="1493483244848" TEXT="create: Create Article">
|
165
|
+
<icon BUILTIN="bookmark"/>
|
166
|
+
</node>
|
167
|
+
<node CREATED="1591278861459" ID="ID_657878492" MODIFIED="1591319807025" TEXT="/articles/my">
|
168
|
+
<arrowlink DESTINATION="ID_657878492" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_883618983" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
169
|
+
<linktarget COLOR="#b0b0b0" DESTINATION="ID_657878492" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_883618983" SOURCE="ID_657878492" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
170
|
+
<icon BUILTIN="forward"/>
|
171
|
+
</node>
|
172
|
+
</node>
|
173
|
+
<node CREATED="1493419562726" ID="ID_922854639" MODIFIED="1590180584955" TEXT="edit_article: Edit Article">
|
174
|
+
<node CREATED="1493419577933" ID="ID_938626803" MODIFIED="1538329139586" TEXT="select_article: Select Article">
|
175
|
+
<icon BUILTIN="attach"/>
|
176
|
+
<node CREATED="1493479602815" ID="ID_753056881" MODIFIED="1493479606921" TEXT="role:m"/>
|
177
|
+
</node>
|
178
|
+
<node CREATED="1493419612720" ID="ID_661682947" MODIFIED="1493524438941" TEXT="edit_article: Edit Article">
|
179
|
+
<icon BUILTIN="attach"/>
|
180
|
+
<node CREATED="1493479557266" ID="ID_1681993437" MODIFIED="1493479561055" TEXT="role:m"/>
|
181
|
+
</node>
|
182
|
+
<node CREATED="1493419735921" ID="ID_1575963748" MODIFIED="1593286858918" TEXT="j_update: Update Article">
|
183
|
+
<icon BUILTIN="bookmark"/>
|
184
|
+
</node>
|
185
|
+
<node CREATED="1591278861459" ID="ID_863187878" MODIFIED="1591319807025" TEXT="/articles/my">
|
186
|
+
<arrowlink DESTINATION="ID_863187878" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_604727235" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
187
|
+
<linktarget COLOR="#b0b0b0" DESTINATION="ID_863187878" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_604727235" SOURCE="ID_863187878" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
188
|
+
<icon BUILTIN="forward"/>
|
189
|
+
</node>
|
190
|
+
</node>
|
191
|
+
<node CREATED="1495246388313" ID="ID_1861034169" MODIFIED="1585001527103" TEXT="xedit_article: xEdit Article">
|
192
|
+
<icon BUILTIN="button_cancel"/>
|
193
|
+
<node CREATED="1495246432533" ID="ID_91386173" MODIFIED="1495267233398" TEXT="edit_article: Edit Article">
|
194
|
+
<icon BUILTIN="attach"/>
|
195
|
+
<node CREATED="1495246517185" ID="ID_1224073606" MODIFIED="1495246522964" TEXT="role:m"/>
|
196
|
+
</node>
|
197
|
+
<node CREATED="1495246466176" ID="ID_1635586443" MODIFIED="1593286876869" TEXT="j_update: Update Article">
|
198
|
+
<icon BUILTIN="bookmark"/>
|
199
|
+
</node>
|
200
|
+
</node>
|
201
|
+
</node>
|
202
|
+
<node CREATED="1493664700564" ID="ID_704959130" MODIFIED="1592950100226" TEXT="comments: Comment">
|
203
|
+
<icon BUILTIN="button_cancel"/>
|
204
|
+
<node CREATED="1493665155709" ID="ID_1973520751" MODIFIED="1591392666652" TEXT="new_comment: New Comment">
|
205
|
+
<icon BUILTIN="button_cancel"/>
|
206
|
+
<node CREATED="1493665192413" ID="ID_345629058" MODIFIED="1493665226422" TEXT="create">
|
207
|
+
<icon BUILTIN="bookmark"/>
|
208
|
+
<node CREATED="1493665231940" ID="ID_1645532530" MODIFIED="1493665237018" TEXT="role:m"/>
|
209
|
+
</node>
|
210
|
+
<node CREATED="1591278861459" ID="ID_170265872" MODIFIED="1591319807025" TEXT="/articles/my">
|
211
|
+
<arrowlink DESTINATION="ID_170265872" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1468117" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
212
|
+
<linktarget COLOR="#b0b0b0" DESTINATION="ID_170265872" ENDARROW="Default" ENDINCLINATION="0;0;" ID="Arrow_ID_1468117" SOURCE="ID_170265872" STARTARROW="None" STARTINCLINATION="0;0;"/>
|
213
|
+
<icon BUILTIN="forward"/>
|
214
|
+
</node>
|
215
|
+
</node>
|
216
|
+
<node CREATED="1494393494180" ID="ID_1101205873" MODIFIED="1495275996686" TEXT="role:m"/>
|
217
|
+
</node>
|
218
|
+
<node CREATED="1489875563330" FOLDED="true" ID="ID_1495015891" MODIFIED="1507248509212" TEXT="ctrs: ctrs& Menu">
|
219
|
+
<node CREATED="1489875583646" ID="ID_1796125628" MODIFIED="1494393464288" TEXT="role:a"/>
|
220
|
+
<node CREATED="1275905802131" ID="ID_1960607342" MODIFIED="1489938927874" TEXT="vfolder1:Sub Menu 1">
|
221
|
+
<node CREATED="1275756515843" ID="ID_328242903" MODIFIED="1489939229748" TEXT="viewfile1: Title 1">
|
222
|
+
<icon BUILTIN="attach"/>
|
223
|
+
<node CREATED="1282816887988" ID="ID_1479413309" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
224
|
+
</node>
|
225
|
+
<node CREATED="1275756515843" ID="ID_1316819449" MODIFIED="1490683859703" TEXT="viewfile2: Title 2">
|
226
|
+
<icon BUILTIN="attach"/>
|
227
|
+
<node CREATED="1282816887988" ID="ID_1510989172" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
228
|
+
</node>
|
229
|
+
<node CREATED="1275756530989" ID="ID_171099141" MODIFIED="1489939276491" TEXT="update_viewfile1">
|
230
|
+
<icon BUILTIN="bookmark"/>
|
231
|
+
</node>
|
232
|
+
</node>
|
233
|
+
<node CREATED="1275756504750" ID="ID_914236141" MODIFIED="1489939000929" TEXT="vfolder2:Title 2">
|
234
|
+
<node CREATED="1275756515843" ID="ID_1222970183" MODIFIED="1489939293714" TEXT="viewfile2: Title 2">
|
235
|
+
<icon BUILTIN="attach"/>
|
236
|
+
<node CREATED="1282816887988" ID="ID_1312913420" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
237
|
+
</node>
|
238
|
+
</node>
|
239
|
+
</node>
|
240
|
+
<node CREATED="1494172726642" ID="ID_925257043" MODIFIED="1494172755433" TEXT="sitemap: Sitemap">
|
241
|
+
<node CREATED="1494172758253" ID="ID_961056168" MODIFIED="1494172797972" TEXT="sitemap: Sitemap"/>
|
242
|
+
<node CREATED="1494393494180" ID="ID_242460166" MODIFIED="1494393504971" TEXT="role:a"/>
|
243
|
+
</node>
|
244
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_35210833" MODIFIED="1591392800862" TEXT="api/v1/notes: Notes API ">
|
245
|
+
<node CREATED="1493489768542" ID="ID_1053900670" MODIFIED="1591074318558" TEXT="link:My Notes: /api/v1/notes/my">
|
246
|
+
<icon BUILTIN="button_cancel"/>
|
247
|
+
<node CREATED="1493490295677" ID="ID_1597553308" MODIFIED="1493490302239" TEXT="role:m"/>
|
248
|
+
</node>
|
249
|
+
<node CREATED="1493419257021" ID="ID_1182560700" MODIFIED="1581180635669" TEXT="new: New Note">
|
250
|
+
<node CREATED="1493419299004" ID="ID_840380967" MODIFIED="1581351169990" TEXT="new_note: New ">
|
251
|
+
<icon BUILTIN="attach"/>
|
252
|
+
<node CREATED="1493479075294" ID="ID_10690659" MODIFIED="1493479079687" TEXT="role:m"/>
|
253
|
+
</node>
|
254
|
+
<node CREATED="1493419491125" ID="ID_924027059" MODIFIED="1581180747700" TEXT="create: Create">
|
255
|
+
<icon BUILTIN="bookmark"/>
|
256
|
+
</node>
|
257
|
+
</node>
|
258
|
+
<node CREATED="1493419562726" ID="ID_963001770" MODIFIED="1581180788218" TEXT="edit: Edit">
|
259
|
+
<node CREATED="1493419612720" ID="ID_1362613316" MODIFIED="1581350996674" TEXT="edit_note: Edit">
|
260
|
+
<icon BUILTIN="attach"/>
|
261
|
+
<node CREATED="1493479557266" ID="ID_1838104057" MODIFIED="1493479561055" TEXT="role:m"/>
|
262
|
+
</node>
|
263
|
+
<node CREATED="1493419735921" ID="ID_1445882396" MODIFIED="1581180869775" TEXT="update: Update">
|
264
|
+
<icon BUILTIN="bookmark"/>
|
265
|
+
</node>
|
266
|
+
</node>
|
267
|
+
<node CREATED="1495246388313" ID="ID_918406528" MODIFIED="1581340759604" STYLE="fork" TEXT="delete:Delete">
|
268
|
+
<edge COLOR="#808080" STYLE="bezier" WIDTH="thin"/>
|
269
|
+
<node CREATED="1493419577933" ID="ID_809771470" MODIFIED="1581350942681" TEXT="select_note: Select">
|
270
|
+
<icon BUILTIN="attach"/>
|
271
|
+
<node CREATED="1493479602815" ID="ID_1160875526" MODIFIED="1493479606921" TEXT="role:m"/>
|
272
|
+
</node>
|
273
|
+
<node CREATED="1495246466176" ID="ID_506410154" MODIFIED="1581799929028" TEXT="delete: Delete">
|
274
|
+
<icon BUILTIN="bookmark"/>
|
275
|
+
</node>
|
276
|
+
</node>
|
277
|
+
</node>
|
278
|
+
</node>
|
279
|
+
<node CREATED="1273819465949" FOLDED="true" ID="ID_855471610" MODIFIED="1583097143651" POSITION="right" TEXT="roles">
|
280
|
+
<node CREATED="1273819847470" ID="ID_1681080231" MODIFIED="1330477307826" TEXT="m: member"/>
|
281
|
+
<node CREATED="1273819855875" ID="ID_1429503284" MODIFIED="1330477311102" TEXT="a: admin"/>
|
282
|
+
<node CREATED="1273819859775" ID="ID_568365839" MODIFIED="1330477315009" TEXT="d: developer"/>
|
283
|
+
</node>
|
284
|
+
<node CREATED="1273819456867" FOLDED="true" ID="ID_1677010054" MODIFIED="1591392810437" POSITION="left" TEXT="models">
|
285
|
+
<node CREATED="1292122118499" FOLDED="true" ID="ID_1957754752" MODIFIED="1493705885123" TEXT="person">
|
286
|
+
<node CREATED="1292122135809" ID="ID_1617970069" MODIFIED="1332878659106" TEXT="fname"/>
|
287
|
+
<node CREATED="1292122150362" ID="ID_1200135538" MODIFIED="1332878662388" TEXT="lname"/>
|
288
|
+
<node CREATED="1332876694150" ID="ID_1770958985" MODIFIED="1332876730552" TEXT="sex: integer">
|
289
|
+
<node CREATED="1332878665790" ID="ID_793089342" MODIFIED="1332878668499" TEXT="1: male"/>
|
290
|
+
<node CREATED="1332878669085" ID="ID_1796007763" MODIFIED="1332878673144" TEXT="2: female"/>
|
291
|
+
</node>
|
292
|
+
<node CREATED="1292123322429" ID="ID_1509464300" MODIFIED="1332878620176" TEXT="belongs_to :address">
|
293
|
+
<icon BUILTIN="edit"/>
|
294
|
+
</node>
|
295
|
+
<node CREATED="1292122156430" ID="ID_604231613" MODIFIED="1292122161324" TEXT="dob: date"/>
|
296
|
+
<node CREATED="1286576968143" ID="ID_936807610" MODIFIED="1332878681362" TEXT="phone"/>
|
297
|
+
<node CREATED="1290823140269" ID="ID_1957301629" MODIFIED="1332878684453" TEXT="photo"/>
|
298
|
+
</node>
|
299
|
+
<node CREATED="1292122236285" FOLDED="true" ID="ID_959987887" MODIFIED="1493768919147" TEXT="address">
|
300
|
+
<node CREATED="1292122254622" ID="ID_430517150" MODIFIED="1355422372241" TEXT="address_street"/>
|
301
|
+
<node CREATED="1355422373525" ID="ID_1797865138" MODIFIED="1355422378352" TEXT="city"/>
|
302
|
+
<node CREATED="1355422378959" ID="ID_1964490487" MODIFIED="1355422380765" TEXT="state"/>
|
303
|
+
<node CREATED="1355422381231" ID="ID_1226075540" MODIFIED="1355422382748" TEXT="zip"/>
|
304
|
+
<node CREATED="1332876680122" ID="ID_65427990" MODIFIED="1332876682148" TEXT="phone"/>
|
305
|
+
<node CREATED="1292243471343" ID="ID_1859608350" MODIFIED="1310195256623" TEXT="lat: float"/>
|
306
|
+
<node CREATED="1292243477436" ID="ID_48497260" MODIFIED="1310195262534" TEXT="lng: float"/>
|
307
|
+
</node>
|
308
|
+
<node CREATED="1493418879485" FOLDED="true" ID="ID_1995497233" MODIFIED="1583097163789" TEXT="article">
|
309
|
+
<node CREATED="1493418891110" ID="ID_364756011" MODIFIED="1493418905253" TEXT="title"/>
|
310
|
+
<node CREATED="1493418906868" ID="ID_1676483995" MODIFIED="1493418911919" TEXT="text"/>
|
311
|
+
<node CREATED="1493487131376" ID="ID_1334057464" MODIFIED="1538328284823" TEXT="belongs_to :user, :class_name => "User"">
|
312
|
+
<icon BUILTIN="edit"/>
|
313
|
+
</node>
|
314
|
+
<node CREATED="1493705838166" ID="ID_408271104" MODIFIED="1493705877062" TEXT="has_many :comments">
|
315
|
+
<icon BUILTIN="edit"/>
|
316
|
+
</node>
|
317
|
+
<node CREATED="1493718773517" ID="ID_944554146" MODIFIED="1493718808965" TEXT="validates :title, :text, :user_id, presence: true">
|
318
|
+
<icon BUILTIN="edit"/>
|
319
|
+
</node>
|
320
|
+
<node CREATED="1494181636998" ID="ID_229502630" MODIFIED="1494181660419" TEXT="body"/>
|
321
|
+
<node CREATED="1497913676275" ID="ID_404103076" MODIFIED="1497913685065" TEXT="keywords"/>
|
322
|
+
</node>
|
323
|
+
<node CREATED="1493418915637" FOLDED="true" ID="ID_429078131" MODIFIED="1583097162517" TEXT="comment">
|
324
|
+
<node CREATED="1493418939760" ID="ID_1251093062" MODIFIED="1493418943423" TEXT="body"/>
|
325
|
+
<node CREATED="1493418945686" ID="ID_911071644" MODIFIED="1493418986711" TEXT="belongs_to :article">
|
326
|
+
<icon BUILTIN="edit"/>
|
327
|
+
</node>
|
328
|
+
<node CREATED="1493643129947" ID="ID_588013696" MODIFIED="1493643146424" TEXT="belongs_to :user">
|
329
|
+
<icon BUILTIN="edit"/>
|
330
|
+
</node>
|
331
|
+
<node CREATED="1493718512191" ID="ID_173203253" MODIFIED="1493718583874" TEXT="validates :body, :user_id, :article_id, presence: true">
|
332
|
+
<icon BUILTIN="edit"/>
|
333
|
+
</node>
|
334
|
+
</node>
|
335
|
+
<node CREATED="1494040082403" FOLDED="true" ID="ID_864577403" MODIFIED="1583097161145" TEXT="picture">
|
336
|
+
<node CREATED="1494040091583" ID="ID_679208099" MODIFIED="1494040119098" TEXT="picture"/>
|
337
|
+
<node CREATED="1494040120208" ID="ID_1266154874" MODIFIED="1494040125130" TEXT="description"/>
|
338
|
+
<node CREATED="1493487131376" ID="ID_1422817360" MODIFIED="1493487186856" TEXT="belongs_to :user">
|
339
|
+
<icon BUILTIN="edit"/>
|
340
|
+
</node>
|
341
|
+
</node>
|
342
|
+
<node CREATED="1581177067029" FOLDED="true" ID="ID_1450593753" MODIFIED="1583089083450" TEXT="note">
|
343
|
+
<node CREATED="1581243923100" ID="ID_537548385" MODIFIED="1581243965554" TEXT="include Mongoid::Attributes::Dynamic">
|
344
|
+
<icon BUILTIN="edit"/>
|
345
|
+
</node>
|
346
|
+
<node CREATED="1581177848957" ID="ID_1611227370" MODIFIED="1581177857470" TEXT="title"/>
|
347
|
+
<node CREATED="1581177867775" ID="ID_88547965" MODIFIED="1581177883555" TEXT="body"/>
|
348
|
+
<node CREATED="1493643129947" ID="ID_1655403736" MODIFIED="1493643146424" TEXT="belongs_to :user">
|
349
|
+
<icon BUILTIN="edit"/>
|
350
|
+
</node>
|
351
|
+
<node CREATED="1581984419312" ID="ID_1934899110" MODIFIED="1581985586488" TEXT="before_validation :ensure_title_has_a_value ">
|
352
|
+
<icon BUILTIN="edit"/>
|
353
|
+
</node>
|
354
|
+
<node CREATED="1581495182445" ID="ID_1430552418" MODIFIED="1581985664674" TEXT="validates :title, length: { maximum: (MAX_TITLE_LENGTH = 30), message: "Must be less than 30 characters" }, presence: true">
|
355
|
+
<icon BUILTIN="edit"/>
|
356
|
+
</node>
|
357
|
+
<node CREATED="1581495221779" ID="ID_1231500988" MODIFIED="1581985709585" TEXT="validates :body, length: { maximum: (MAX_BODY_LENGTH = 1000), message: "Must be less than 1000 characters"} ">
|
358
|
+
<icon BUILTIN="edit"/>
|
359
|
+
</node>
|
360
|
+
<node CREATED="1581986280028" ID="ID_1069060625" MODIFIED="1581987310544" TEXT="private
 def ensure_title_has_a_value
 if title.blank?
 self.title = body[0..(MAX_TITLE_LENGTH-1)] unless body.blank?
 end
 end
 
">
|
361
|
+
<icon BUILTIN="edit"/>
|
362
|
+
</node>
|
363
|
+
</node>
|
364
|
+
</node>
|
365
|
+
</node>
|
366
|
+
</map>
|