redmine_extensions 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +2 -2
- data/app/models/easy_setting.rb +1 -1
- data/app/views/easy_queries/_entities.html.erb +60 -0
- data/app/views/easy_queries/_index.html.erb +10 -0
- data/app/views/easy_queries/_settings.html.erb +44 -0
- data/lib/generators/redmine_extensions/entity/USAGE +11 -0
- data/lib/generators/redmine_extensions/entity/entity_generator.rb +257 -0
- data/lib/generators/redmine_extensions/entity/templates/_form.html.erb.erb +36 -0
- data/lib/generators/redmine_extensions/entity/templates/_sidebar.html.erb.erb +9 -0
- data/lib/generators/redmine_extensions/entity/templates/_view_custom_fields_form_custom_field.html.erb.erb +1 -0
- data/lib/generators/redmine_extensions/entity/templates/context_menu.html.erb.erb +8 -0
- data/lib/generators/redmine_extensions/entity/templates/controller.rb.erb +158 -0
- data/lib/generators/redmine_extensions/entity/templates/custom_field.rb.erb +7 -0
- data/lib/generators/redmine_extensions/entity/templates/edit.html.erb.erb +17 -0
- data/lib/generators/redmine_extensions/entity/templates/en.yml.erb +10 -0
- data/lib/generators/redmine_extensions/entity/templates/helper.rb.erb +24 -0
- data/lib/generators/redmine_extensions/entity/templates/hooks.rb.erb +7 -0
- data/lib/generators/redmine_extensions/entity/templates/index.api.rsb.erb +5 -0
- data/lib/generators/redmine_extensions/entity/templates/index.html.erb.erb +5 -0
- data/lib/generators/redmine_extensions/entity/templates/mail_added.html.erb.erb +1 -0
- data/lib/generators/redmine_extensions/entity/templates/mail_added.text.erb.erb +2 -0
- data/lib/generators/redmine_extensions/entity/templates/mail_updated.html.erb.erb +1 -0
- data/lib/generators/redmine_extensions/entity/templates/mail_updated.text.erb.erb +2 -0
- data/lib/generators/redmine_extensions/entity/templates/mailer.rb.erb +41 -0
- data/lib/generators/redmine_extensions/entity/templates/migration.rb.erb +9 -0
- data/lib/generators/redmine_extensions/entity/templates/model.rb.erb +137 -0
- data/lib/generators/redmine_extensions/entity/templates/new.html.erb.erb +17 -0
- data/lib/generators/redmine_extensions/entity/templates/query.rb.erb +41 -0
- data/lib/generators/redmine_extensions/entity/templates/routes.rb.erb +12 -0
- data/lib/generators/redmine_extensions/entity/templates/show.api.rsb.erb +1 -0
- data/lib/generators/redmine_extensions/entity/templates/show.html.erb.erb +38 -0
- data/lib/generators/redmine_extensions/plugin/USAGE +11 -0
- data/lib/generators/redmine_extensions/plugin/plugin_generator.rb +57 -0
- data/lib/generators/redmine_extensions/plugin/templates/Gemfile +1 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/after_init.rb.erb +0 -0
- data/lib/generators/redmine_extensions/plugin/templates/en.yml +2 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/hooks.rb.erb +0 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/init.rb.erb +11 -11
- data/lib/generators/redmine_extensions/plugin/templates/internals.rb.erb +4 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/issue_patch.example.erb +0 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/issues_controller_patch.example.erb +0 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/issues_helper_patch.example.erb +0 -0
- data/lib/generators/{easy_redmine_plugin → redmine_extensions/plugin}/templates/routes.rb.erb +0 -0
- data/lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb +27 -0
- data/lib/redmine_extensions/easy_query_adapter.rb +142 -0
- data/lib/redmine_extensions/engine.rb +4 -1
- data/lib/redmine_extensions/redmine_patches/controllers/application_controller_patch.rb +55 -0
- data/lib/redmine_extensions/redmine_patches/patches.rb +4 -0
- data/lib/redmine_extensions/version.rb +1 -1
- metadata +49 -355
- data/app/assets/javascripts/redmine_extensions/ckeditor/CHANGES.md +0 -720
- data/app/assets/javascripts/redmine_extensions/ckeditor/LICENSE.md +0 -1264
- data/app/assets/javascripts/redmine_extensions/ckeditor/README.md +0 -39
- data/app/assets/javascripts/redmine_extensions/ckeditor/adapters/jquery.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/build-config.js +0 -139
- data/app/assets/javascripts/redmine_extensions/ckeditor/ckeditor.js +0 -1097
- data/app/assets/javascripts/redmine_extensions/ckeditor/config.js +0 -58
- data/app/assets/javascripts/redmine_extensions/ckeditor/contents.css +0 -134
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/cs.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/da.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/de.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/en.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/es.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/fi.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/fr.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/he.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/hu.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/it.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/ja.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/ko.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/nl.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/no.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/pl.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/pt-br.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/pt.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/ru.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/sk.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/sl.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/sv.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/zh-cn.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/lang/zh.js +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +0 -25
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/about/dialogs/about.js +0 -7
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/base64image/LICENSE.md +0 -1243
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/base64image/README.md +0 -21
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/base64image/dialogs/base64image.js +0 -16
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/clipboard/dialogs/paste.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/dialogs/codesnippet.js +0 -6
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/CHANGES.md +0 -827
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/LICENSE +0 -24
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/README.md +0 -167
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/README.ru.md +0 -171
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js +0 -1
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/arta.css +0 -160
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/ascetic.css +0 -50
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-dune.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-dune.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-forest.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-forest.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-heath.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-heath.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-lakeside.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-lakeside.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-seaside.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/atelier-seaside.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/brown_paper.css +0 -105
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/brown_papersq.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/dark.css +0 -105
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/default.css +0 -153
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/docco.css +0 -132
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/far.css +0 -113
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/foundation.css +0 -133
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/github.css +0 -125
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/googlecode.css +0 -147
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/idea.css +0 -122
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/ir_black.css +0 -105
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/magula.css +0 -122
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/mono-blue.css +0 -62
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/monokai.css +0 -127
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/monokai_sublime.css +0 -149
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/obsidian.css +0 -154
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/paraiso.dark.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/paraiso.light.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/pojoaque.css +0 -106
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/pojoaque.jpg +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/railscasts.css +0 -182
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/rainbow.css +0 -112
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/school_book.css +0 -113
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/school_book.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/solarized_dark.css +0 -107
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/solarized_light.css +0 -107
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/sunburst.css +0 -160
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow-night-blue.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow-night-bright.css +0 -92
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow-night-eighties.css +0 -92
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow-night.css +0 -93
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow.css +0 -90
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/vs.css +0 -89
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/xcode.css +0 -158
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/codesnippet/lib/highlight/styles/zenburn.css +0 -116
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/dialog/dialogDefinition.js +0 -4
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/div/dialogs/div.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/find/dialogs/find.js +0 -24
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/flash/dialogs/flash.js +0 -24
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/button.js +0 -8
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/checkbox.js +0 -8
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/form.js +0 -8
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -7
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/radio.js +0 -8
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/select.js +0 -20
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/textarea.js +0 -8
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/dialogs/textfield.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/icons.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/icons_hidpi.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/iframe/dialogs/iframe.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/image/dialogs/image.js +0 -43
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/image/images/noimage.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/link/dialogs/anchor.js +0 -7
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/link/dialogs/link.js +0 -26
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/pastefromword/filter/default.js +0 -31
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/preview/preview.html +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/scayt/LICENSE.md +0 -28
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/scayt/README.md +0 -25
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/scayt/dialogs/options.js +0 -17
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -71
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/dialogs/smiley.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/envelope.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/heart.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/kiss.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +0 -20
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/af.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ar.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/bg.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ca.js +0 -14
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/cs.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/cy.js +0 -14
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/da.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/de.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/el.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/en.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/eo.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/es.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/et.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/fa.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/fi.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/fr.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/gl.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/he.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/hr.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/hu.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/id.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/it.js +0 -14
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ja.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/km.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ku.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/lt.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/lv.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/nb.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/nl.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/no.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/pl.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/pt.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ru.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/si.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/sk.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/sl.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/sq.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/sv.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/th.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/tr.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/tt.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/ug.js +0 -13
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/uk.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/vi.js +0 -14
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +0 -9
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/lang/zh.js +0 -12
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -14
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/table/dialogs/table.js +0 -21
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -17
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/dialogs/templates.css +0 -84
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/dialogs/templates.js +0 -10
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/templates/default.js +0 -6
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/widget/images/handle.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/LICENSE.md +0 -28
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/README.md +0 -25
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -66
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/dialogs/wsc.css +0 -82
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/dialogs/wsc.js +0 -74
- data/app/assets/javascripts/redmine_extensions/ckeditor/plugins/wsc/dialogs/wsc_ie.js +0 -11
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/dialog.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/dialog_ie.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/dialog_ie7.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/dialog_ie8.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor_gecko.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor_ie.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor_ie7.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor_ie8.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/editor_iequirks.css +0 -5
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/icons.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/arrow.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/close.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/lock.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/images/refresh.png +0 -0
- data/app/assets/javascripts/redmine_extensions/ckeditor/skins/moono/readme.md +0 -51
- data/app/assets/javascripts/redmine_extensions/ckeditor/styles.js +0 -111
- data/app/views/layouts/redmine_extensions/application.html.erb +0 -14
- data/config/database.yml.mysql +0 -51
- data/lib/generators/easy_redmine_plugin/USAGE +0 -8
- data/lib/generators/easy_redmine_plugin/easy_redmine_plugin_generator.rb +0 -49
- data/lib/generators/easy_redmine_plugin/templates/Gemfile +0 -1
- data/lib/generators/easy_redmine_plugin/templates/cs.yml +0 -5
- data/lib/generators/easy_redmine_plugin/templates/de.yml +0 -5
- data/lib/generators/easy_redmine_plugin/templates/en.yml +0 -5
- data/lib/generators/easy_redmine_plugin/templates/internals.rb.erb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c56cf74bf7a5e84053103abe17cb1050017751
|
4
|
+
data.tar.gz: edcc2d83c5b77cc2ffa6c0c136b73b2617bc950b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f911f6c6cf06b2a1c73ef2b6f8b0a178cd133011378b9b080a49de9c403655c17fa22ba81eade59bdeb17685cf1a3eb56bc19b9d8801adfbb7bf6d10bc9bec0
|
7
|
+
data.tar.gz: 94065db421dfd4ed9aa5b67149445a28056a16b7a8d82eead9dedf87975748086607e5e59f5ab805eb1b11f79d58411034427f58ac89c0f457eec85a48a489e7
|
@@ -203,8 +203,8 @@ REDMINE_EXTENSIONS = {
|
|
203
203
|
};
|
204
204
|
|
205
205
|
Group.prototype.createNextButton = function() {
|
206
|
-
this.next_link = $('<a>', {href: this.load_url}).text(this.loader.texts['next']).append($("<i>", {"class": "icon-arrow"}));
|
207
|
-
this.next_button = $('<tr/>', {'class': 'easy-next-button'}).html($('<td>', {colspan: this.loader.options.next_button_cols, "class": "
|
206
|
+
this.next_link = $('<a>', {href: this.load_url, 'class': 'button'}).text(this.loader.texts['next']).append($("<i>", {"class": "icon-arrow"}));
|
207
|
+
this.next_button = $('<tr/>', {'class': 'easy-next-button'}).html($('<td>', {colspan: this.loader.options.next_button_cols, "class": "text-center"}).html(this.next_link));
|
208
208
|
|
209
209
|
var self = this;
|
210
210
|
|
data/app/models/easy_setting.rb
CHANGED
@@ -0,0 +1,60 @@
|
|
1
|
+
<%
|
2
|
+
formatter = query.init_formatter(self)
|
3
|
+
%>
|
4
|
+
|
5
|
+
<%= form_tag({}) do %>
|
6
|
+
<%= hidden_field_tag 'back_url', url_for(params), id: nil %>
|
7
|
+
|
8
|
+
<div class="autoscroll">
|
9
|
+
<table class="list <%= sort_css_classes %>">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th class="checkbox hide-when-print">
|
13
|
+
<%= link_to_function image_tag('toggle_check.png'), 'toggleIssuesSelection(this)' %>
|
14
|
+
</th>
|
15
|
+
|
16
|
+
<% query.inline_columns.each do |column| %>
|
17
|
+
<%= column_header(column) %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if formatter.ending_buttons? %>
|
21
|
+
<th></th>
|
22
|
+
<% end %>
|
23
|
+
</tr>
|
24
|
+
</thead>
|
25
|
+
|
26
|
+
<tbody>
|
27
|
+
<% entities.each do |entity| %>
|
28
|
+
|
29
|
+
<tr id="entity-<%= entity.id %>" class="hascontextmenu <%= cycle('odd', 'even') %>">
|
30
|
+
<td class="checkbox hide-when-print">
|
31
|
+
<%= check_box_tag('ids[]', entity.id, false, id: nil) %>
|
32
|
+
</td>
|
33
|
+
|
34
|
+
<% query.inline_columns.each do |column| %>
|
35
|
+
<td>
|
36
|
+
<%= formatter.format_column(column, entity) %>
|
37
|
+
</td>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if formatter.ending_buttons? %>
|
41
|
+
<td>
|
42
|
+
<%= formatter.ending_buttons(entity) %>
|
43
|
+
</td>
|
44
|
+
<% end %>
|
45
|
+
</tr>
|
46
|
+
|
47
|
+
<% query.block_columns.each do |column| %>
|
48
|
+
<% text = formatter.format_column(column, entity) %>
|
49
|
+
<% if text.present? %>
|
50
|
+
<tr class="<%= current_cycle %>">
|
51
|
+
<td colspan="<%= query.inline_columns.size + (formatter.ending_buttons? ? 2 : 1) %>"><%= text %></td>
|
52
|
+
</tr>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
|
56
|
+
<% end %>
|
57
|
+
</tbody>
|
58
|
+
</table>
|
59
|
+
</div>
|
60
|
+
<% end %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<%= form_tag({}, method: :get, id: 'query_form') do %>
|
2
|
+
<%= hidden_field_tag 'set_filter', '1' %>
|
3
|
+
|
4
|
+
<div id="query_form_with_buttons" class="hide-when-print">
|
5
|
+
<div id="query_form_content">
|
6
|
+
|
7
|
+
<fieldset id="filters" class="collapsible <%= query.new_record? ? '' : 'collapsed' %>">
|
8
|
+
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
9
|
+
|
10
|
+
<div style="<%= query.new_record? ? '' : 'display: none;' %>">
|
11
|
+
<%= render 'queries/filters', query: query %>
|
12
|
+
</div>
|
13
|
+
</fieldset>
|
14
|
+
|
15
|
+
<fieldset class="collapsible collapsed">
|
16
|
+
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
17
|
+
|
18
|
+
<div style="display: none;">
|
19
|
+
<table>
|
20
|
+
<tr>
|
21
|
+
<td><%= l(:field_column_names) %></td>
|
22
|
+
<td><%= render_query_columns_selection(query) %></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<td><%= l(:button_show) %></td>
|
26
|
+
<td><%= available_block_columns_tags(query) %></td>
|
27
|
+
</tr>
|
28
|
+
</table>
|
29
|
+
</div>
|
30
|
+
</fieldset>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<p class="buttons">
|
34
|
+
<%= link_to_function l(:button_apply), '$("#query_form").submit()', class: 'icon icon-checked' %>
|
35
|
+
<%= link_to l(:button_clear), { set_filter: 1, project_id: @project }, class: 'icon icon-reload' %>
|
36
|
+
|
37
|
+
<% if query.new_record? && User.current.allowed_to?(:save_queries, @project, global: true) %>
|
38
|
+
<%= link_to_function l(:button_save),
|
39
|
+
"$('#query_form').attr('action', '#{new_polymorphic_path([@project, :query])}').submit()",
|
40
|
+
class: 'icon icon-save' %>
|
41
|
+
<% end %>
|
42
|
+
</p>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Description:
|
2
|
+
The plugin generator creates stubs for a new Redmine plugin.
|
3
|
+
Plugin is prepared for use in Redmine and Easy Redmine as well.
|
4
|
+
|
5
|
+
Example:
|
6
|
+
rails g redmine_extensions:entity NameOfNewPlugin Post
|
7
|
+
create plugins/name_of_new_plugin/app/controllers
|
8
|
+
...
|
9
|
+
|
10
|
+
Help:
|
11
|
+
rails g redmine_extensions:entity --help
|
@@ -0,0 +1,257 @@
|
|
1
|
+
module RedmineExtensions
|
2
|
+
class EntityGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../templates', __FILE__)
|
4
|
+
|
5
|
+
argument :plugin_name, type: :string, required: true, banner: 'NameOfNewPlugin'
|
6
|
+
argument :model_name, type: :string, required: true, banner: 'Post'
|
7
|
+
argument :attributes, type: :array, required: true, banner: 'field[:type][:index] field[:type][:index]'
|
8
|
+
|
9
|
+
class_option :project, type: :boolean, default: true, banner: '', :desc => 'make model depends on project'
|
10
|
+
class_option :author, type: :boolean, default: true, banner: '', :desc => 'make model depends on project'
|
11
|
+
class_option :mail, type: :boolean, default: true, banner: '', :desc => 'model have mail notifications'
|
12
|
+
class_option :acts_as_activity_provider, type: :boolean, default: true, banner: '', :desc => 'changes in models are visible in user profile'
|
13
|
+
class_option :acts_as_attachable, type: :boolean, default: true, banner: '', :desc => 'model have attachments'
|
14
|
+
class_option :acts_as_customizable, type: :boolean, default: true, banner: '', :desc => 'model have custom fields'
|
15
|
+
class_option :acts_as_event, type: :boolean, default: true, banner: '', :desc => 'model should be visible in a calendar'
|
16
|
+
class_option :acts_as_list, type: :boolean, default: false, banner: '', :desc => 'model is sorted by position'
|
17
|
+
class_option :acts_as_searchable, type: :boolean, default: true, banner: '', :desc => 'model is searchable'
|
18
|
+
class_option :acts_as_tree, type: :boolean, default: false, banner: '', :desc => 'model have hierarchy'
|
19
|
+
class_option :acts_as_versioned, type: :boolean, default: false, banner: '', :desc => 'model is versioned'
|
20
|
+
class_option :acts_as_watchable, type: :boolean, default: false, banner: '', :desc => 'model have watchers'
|
21
|
+
|
22
|
+
attr_reader :plugin_path, :plugin_name_underscored, :plugin_pretty_name, :plugin_title
|
23
|
+
attr_reader :controller_class, :model_name_underscored, :model_name_pluralize_underscored
|
24
|
+
attr_reader :db_columns
|
25
|
+
|
26
|
+
def initialize(*args)
|
27
|
+
super
|
28
|
+
@plugin_name_underscored = plugin_name.underscore
|
29
|
+
@plugin_pretty_name = @plugin_name_underscored.titleize
|
30
|
+
@plugin_path = "plugins/#{@plugin_name_underscored}"
|
31
|
+
@plugin_title = @plugin_name_underscored.camelize
|
32
|
+
|
33
|
+
@model_name_underscored = model_name.underscore
|
34
|
+
@model_name_pluralize_underscored = model_name.pluralize.underscore
|
35
|
+
@controller_class = model_name.pluralize
|
36
|
+
|
37
|
+
prepare_columns
|
38
|
+
end
|
39
|
+
|
40
|
+
def copy_templates
|
41
|
+
template '_form.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/_form.html.erb"
|
42
|
+
template '_sidebar.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/_sidebar.html.erb"
|
43
|
+
template '_view_custom_fields_form_custom_field.html.erb.erb', "#{plugin_path}/app/views/custom_fields/_view_custom_fields_form_#{model_name_underscored}_custom_field.html.erb"
|
44
|
+
template 'context_menu.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/context_menu.html.erb"
|
45
|
+
template 'controller.rb.erb', "#{plugin_path}/app/controllers/#{model_name_pluralize_underscored}_controller.rb"
|
46
|
+
template('custom_field.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}_custom_field.rb") if acts_as_customizable?
|
47
|
+
template 'edit.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/edit.html.erb"
|
48
|
+
|
49
|
+
if File.exists?("#{plugin_path}/config/locales/en.yml")
|
50
|
+
append_to_file "#{plugin_path}/config/locales/en.yml" do
|
51
|
+
"\n heading_#{model_name_underscored}_new: New #{model_name_underscored.titleize}" +
|
52
|
+
"\n heading_#{model_name_underscored}_edit: Edit #{model_name_underscored.titleize}" +
|
53
|
+
"\n button_#{model_name_underscored}_new: New #{model_name_underscored.titleize}" +
|
54
|
+
"\n label_#{model_name_pluralize_underscored}: #{@model_name_pluralize_underscored.titleize}" +
|
55
|
+
"\n label_#{model_name_underscored}: #{model_name_underscored.titleize}" +
|
56
|
+
"\n permission_view_#{model_name_pluralize_underscored}: View #{model_name_pluralize_underscored.titleize}" +
|
57
|
+
"\n permission_manage_#{model_name_pluralize_underscored}: Manage #{model_name_pluralize_underscored.titleize}" +
|
58
|
+
"\n title_#{model_name_underscored}_new: Click to create new #{model_name_underscored.titleize}"
|
59
|
+
end
|
60
|
+
append_to_file "#{plugin_path}/config/locales/en.yml" do
|
61
|
+
db_columns.collect { |column_name, column_options| "\n #{column_options[:lang_key]}: #{column_name.humanize}" }.join
|
62
|
+
end
|
63
|
+
else
|
64
|
+
template 'en.yml.erb', "#{plugin_path}/config/locales/en.yml"
|
65
|
+
end
|
66
|
+
|
67
|
+
template 'helper.rb.erb', "#{plugin_path}/app/helpers/#{model_name_pluralize_underscored}_helper.rb"
|
68
|
+
template 'hooks.rb.erb', "#{plugin_path}/lib/#{plugin_name_underscored}/#{model_name_underscored}_hooks.rb"
|
69
|
+
template 'index.api.rsb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/index.api.rsb"
|
70
|
+
template 'index.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/index.html.erb"
|
71
|
+
if mail?
|
72
|
+
template 'mailer.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}_mailer.rb"
|
73
|
+
template 'mail_added.html.erb.erb', "#{plugin_path}/app/views/#{model_name_underscored}_mailer/#{model_name_underscored}_added.html.erb"
|
74
|
+
template 'mail_added.text.erb.erb', "#{plugin_path}/app/views/#{model_name_underscored}_mailer/#{model_name_underscored}_added.text.erb"
|
75
|
+
template 'mail_updated.html.erb.erb', "#{plugin_path}/app/views/#{model_name_underscored}_mailer/#{model_name_underscored}_updated.html.erb"
|
76
|
+
template 'mail_updated.text.erb.erb', "#{plugin_path}/app/views/#{model_name_underscored}_mailer/#{model_name_underscored}_updated.text.erb"
|
77
|
+
end
|
78
|
+
template 'migration.rb.erb', "#{plugin_path}/db/migrate/#{Time.now.strftime('%Y%m%d%H%M%S')}_create_#{@model_name_pluralize_underscored}.rb"
|
79
|
+
template 'model.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}.rb"
|
80
|
+
template 'new.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/new.html.erb"
|
81
|
+
template 'query.rb.erb', "#{plugin_path}/app/models/#{model_name_underscored}_query.rb"
|
82
|
+
|
83
|
+
if File.exists?("#{plugin_path}/config/routes.rb")
|
84
|
+
if project?
|
85
|
+
append_to_file "#{plugin_path}/config/routes.rb" do
|
86
|
+
"\nresources :projects do " +
|
87
|
+
"\n resources :#{model_name_pluralize_underscored}" +
|
88
|
+
"\nend\n"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
append_to_file "#{plugin_path}/config/routes.rb" do
|
92
|
+
"\nresources :#{model_name_pluralize_underscored} do" +
|
93
|
+
"\n collection do " +
|
94
|
+
"\n get 'bulk_edit'" +
|
95
|
+
"\n post 'bulk_update'" +
|
96
|
+
"\n get 'context_menu'" +
|
97
|
+
"\n end" +
|
98
|
+
"\nend"
|
99
|
+
end
|
100
|
+
else
|
101
|
+
template 'routes.rb.erb', "#{plugin_path}/config/routes.rb"
|
102
|
+
end
|
103
|
+
|
104
|
+
if File.exists?("#{plugin_path}/init.rb")
|
105
|
+
s = "\nActiveSupport.on_load(:active_record) do"
|
106
|
+
s << "\n require '#{plugin_name_underscored}/#{model_name_underscored}_hooks'\n"
|
107
|
+
s << "\n Redmine::AccessControl.map do |map|"
|
108
|
+
s << "\n map.project_module :#{model_name_pluralize_underscored} do |pmap|"
|
109
|
+
s << "\n pmap.permission :view_#{model_name_pluralize_underscored}, { #{model_name_pluralize_underscored}: [:index, :show] }, read: true"
|
110
|
+
s << "\n pmap.permission :manage_#{model_name_pluralize_underscored}, { #{model_name_pluralize_underscored}: [:new, :create, :edit, :update, :destroy, :bulk_edit, :bulk_update, :context_menu] }"
|
111
|
+
s << "\n end "
|
112
|
+
s << "\n end\n"
|
113
|
+
s << "\n Redmine::MenuManager.map :top_menu do |menu|"
|
114
|
+
s << "\n menu.push :#{model_name_pluralize_underscored}, { controller: '#{model_name_pluralize_underscored}', action: 'index', project_id: nil }, caption: :label_#{model_name_pluralize_underscored}"
|
115
|
+
s << "\n end\n"
|
116
|
+
if project?
|
117
|
+
s << "\n Redmine::MenuManager.map :project_menu do |menu|"
|
118
|
+
s << "\n menu.push :#{model_name_pluralize_underscored}, { controller: '#{model_name_pluralize_underscored}', action: 'index' }, param: :project_id, caption: :label_#{model_name_pluralize_underscored}"
|
119
|
+
s << "\n end\n"
|
120
|
+
end
|
121
|
+
if acts_as_customizable?
|
122
|
+
s << "\n CustomFieldsHelper::CUSTOM_FIELDS_TABS << {name: '#{model_name}CustomField', partial: 'custom_fields/index', label: :label_#{model_name_pluralize_underscored}}\n"
|
123
|
+
end
|
124
|
+
if acts_as_searchable?
|
125
|
+
s << "\n Redmine::Search.map do |search|"
|
126
|
+
s << "\n search.register :#{model_name_pluralize_underscored}"
|
127
|
+
s << "\n end\n"
|
128
|
+
end
|
129
|
+
if acts_as_activity_provider?
|
130
|
+
s << "\n Redmine::Activity.map do |activity|"
|
131
|
+
s << "\n activity.register :#{model_name_pluralize_underscored}, {class_name: %w(#{model_name}), default: false}"
|
132
|
+
s << "\n end\n"
|
133
|
+
end
|
134
|
+
s << "\nend"
|
135
|
+
|
136
|
+
append_to_file "#{plugin_path}/init.rb", s
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
template 'show.api.rsb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/show.api.rsb"
|
141
|
+
template 'show.html.erb.erb', "#{plugin_path}/app/views/#{model_name_pluralize_underscored}/show.html.erb"
|
142
|
+
end
|
143
|
+
|
144
|
+
private
|
145
|
+
|
146
|
+
def project?
|
147
|
+
options[:project] == true
|
148
|
+
end
|
149
|
+
|
150
|
+
def author?
|
151
|
+
options[:author] == true
|
152
|
+
end
|
153
|
+
|
154
|
+
def acts_as_customizable?
|
155
|
+
options[:acts_as_customizable] == true
|
156
|
+
end
|
157
|
+
|
158
|
+
def acts_as_searchable?
|
159
|
+
options[:acts_as_searchable] == true
|
160
|
+
end
|
161
|
+
|
162
|
+
def acts_as_activity_provider?
|
163
|
+
options[:acts_as_activity_provider] == true
|
164
|
+
end
|
165
|
+
|
166
|
+
def acts_as_attachable?
|
167
|
+
options[:acts_as_attachable] == true
|
168
|
+
end
|
169
|
+
|
170
|
+
def acts_as_event?
|
171
|
+
options[:acts_as_event] == true
|
172
|
+
end
|
173
|
+
|
174
|
+
def acts_as_list?
|
175
|
+
options[:acts_as_list] == true
|
176
|
+
end
|
177
|
+
|
178
|
+
def acts_as_tree?
|
179
|
+
options[:acts_as_tree] == true
|
180
|
+
end
|
181
|
+
|
182
|
+
def acts_as_versioned?
|
183
|
+
options[:acts_as_versioned] == true
|
184
|
+
end
|
185
|
+
|
186
|
+
def acts_as_watchable?
|
187
|
+
options[:acts_as_watchable] == true
|
188
|
+
end
|
189
|
+
|
190
|
+
def mail?
|
191
|
+
options[:mail] == true
|
192
|
+
end
|
193
|
+
|
194
|
+
def prepare_columns
|
195
|
+
@db_columns = {}
|
196
|
+
|
197
|
+
attributes.each do |attr|
|
198
|
+
attr_name, attr_type, attr_idx = attr.split(':')
|
199
|
+
lang_key = "field_#{model_name_underscored}_#{attr_name.to_s.sub(/_id$/, '').sub(/^.+\./, '')}"
|
200
|
+
|
201
|
+
@db_columns[attr_name] = {type: attr_type || 'string', idx: attr_idx, null: true, safe: true, query_type: attr_type || 'string', lang_key: lang_key}
|
202
|
+
end
|
203
|
+
|
204
|
+
@db_columns['project_id'] = {type: 'integer', idx: nil, null: false, safe: false, class: 'Project', list_class_name: 'name', query_type: 'list_optional', query_column_name: 'project', lang_key: "field_#{model_name_underscored}_project"} if project? && !@db_columns.key?('project_id')
|
205
|
+
@db_columns['author_id'] = {type: 'integer', idx: nil, null: false, safe: true, class: 'User', list_class_name: 'name', query_type: 'list', query_column_name: 'author', lang_key: "field_#{model_name_underscored}_author"} if author? && !@db_columns.key?('author_id')
|
206
|
+
@db_columns['created_at'] = {type: 'datetime', idx: nil, null: false, safe: false, query_type: 'date', lang_key: "field_#{model_name_underscored}_created_at"}
|
207
|
+
@db_columns['updated_at'] = {type: 'datetime', idx: nil, null: false, safe: false, query_type: 'date', lang_key: "field_#{model_name_underscored}_updated_at"}
|
208
|
+
end
|
209
|
+
|
210
|
+
def safe_columns
|
211
|
+
@db_columns.select { |_, column_options| column_options[:safe] }
|
212
|
+
end
|
213
|
+
|
214
|
+
def string_columns
|
215
|
+
@db_columns.select { |_, column_options| column_options[:safe] && column_options[:type] == 'string' }
|
216
|
+
end
|
217
|
+
|
218
|
+
def text_columns
|
219
|
+
@db_columns.select { |_, column_options| column_options[:safe] && column_options[:type] == 'text' }
|
220
|
+
end
|
221
|
+
|
222
|
+
def form_columns
|
223
|
+
@db_columns.select { |_, column_options| column_options[:safe] }
|
224
|
+
end
|
225
|
+
|
226
|
+
def name_column
|
227
|
+
'name' if string_columns.keys.include?('name')
|
228
|
+
string_columns.keys.first
|
229
|
+
end
|
230
|
+
|
231
|
+
def name_column?
|
232
|
+
!name_column.blank?
|
233
|
+
end
|
234
|
+
|
235
|
+
def description_column
|
236
|
+
'description' if text_columns.keys.include?('description')
|
237
|
+
text_columns.keys.first
|
238
|
+
end
|
239
|
+
|
240
|
+
def description_column?
|
241
|
+
!description_column.blank?
|
242
|
+
end
|
243
|
+
|
244
|
+
def view_permission
|
245
|
+
"view_#{@model_name_pluralize_underscored}"
|
246
|
+
end
|
247
|
+
|
248
|
+
def edit_permission
|
249
|
+
"edit_#{@model_name_pluralize_underscored}"
|
250
|
+
end
|
251
|
+
|
252
|
+
def delete_permission
|
253
|
+
"edit_#{@model_name_pluralize_underscored}"
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%%= fields_for :<%= model_name_underscored %>, <%= model_name_underscored %> do |f| %>
|
2
|
+
<%- if project? -%>
|
3
|
+
<%% if <%= model_name_underscored %>.safe_attribute?('project_id') && !@project %>
|
4
|
+
<p>
|
5
|
+
<%%= f.label :project_id, <%= model_name %>.human_attribute_name(:project_id) %>
|
6
|
+
<%%= f.select :project_id, Project.allowed_to(:manage_<%= model_name_pluralize_underscored %>).collect{|x| [x.name, x.id]}, include_blank: true %>
|
7
|
+
</p>
|
8
|
+
<%% end %>
|
9
|
+
<%- end -%>
|
10
|
+
<%- safe_columns.each do |column_name, column_options| -%>
|
11
|
+
<%% if <%= model_name_underscored %>.safe_attribute?('<%= column_name %>') %>
|
12
|
+
<p>
|
13
|
+
<%%= f.label :<%= column_name %>, <%= model_name %>.human_attribute_name(:<%= column_name %>) %>
|
14
|
+
<%- if column_options[:query_type] == 'string' || column_options[:query_type] == 'integer' -%>
|
15
|
+
<%%= f.text_field :<%= column_name %> %>
|
16
|
+
<%- elsif column_options[:query_type] == 'list' || column_options[:query_type] == 'list_optional' -%>
|
17
|
+
<%%= f.select :<%= column_name %>, <%= column_options[:class] %>.all.collect{|x| [x.<%= column_options[:list_class_name] %>, x.id]}, include_blank: true %>
|
18
|
+
<%- elsif column_options[:query_type] == 'text' -%>
|
19
|
+
<%%= f.text_area :<%= column_name %>, :cols => 60, :rows => (<%= model_name_underscored %>.<%= column_name %>.blank? ? 10 : [[10, <%= model_name_underscored %>.<%= column_name %>.length / 50].max, 100].min), :accesskey => accesskey(:edit), :class => 'wiki-edit' %>
|
20
|
+
<%%= wikitoolbar_for '<%= model_name_underscored %>_<%= column_name %>' %>
|
21
|
+
<%- end -%>
|
22
|
+
</p>
|
23
|
+
<%% end %>
|
24
|
+
<%- end -%>
|
25
|
+
<%- if acts_as_customizable? -%>
|
26
|
+
<%% custom_field_values = <%= model_name_underscored %>.visible_custom_field_values %>
|
27
|
+
<%% custom_field_values.each do |value| %>
|
28
|
+
<p>
|
29
|
+
<%%= custom_field_tag_with_label :<%= model_name_underscored %>, value %>
|
30
|
+
</p>
|
31
|
+
<%% end %>
|
32
|
+
<%- end -%>
|
33
|
+
<%- if acts_as_attachable? -%>
|
34
|
+
<p id="attachments_form"><label><%%= l(:label_attachment_plural) %></label><%%= render :partial => 'attachments/form', :locals => {:container => <%= model_name_underscored %>} %></p>
|
35
|
+
<%- end -%>
|
36
|
+
<%% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<ul>
|
2
|
+
<%% if @<%= model_name_underscored %> && !@<%= model_name_underscored %>.new_record? %>
|
3
|
+
<li><%%= link_to l(:button_edit), edit_polymorphic_path([@project, @<%= model_name_underscored %>]), title: l(:button_edit), class: 'icon icon-edit' %></li>
|
4
|
+
<%% end %>
|
5
|
+
<%% if @<%= model_name_underscored %>.nil? %>
|
6
|
+
<li><%%= link_to l(:button_<%= model_name_underscored %>_new), new_polymorphic_path([@project, :<%= model_name_underscored %>]), title: l(:title_<%= model_name_underscored %>_new), class: 'icon icon-add' %></li>
|
7
|
+
<%% end %>
|
8
|
+
<li><%%= link_to l(:label_<%= model_name_pluralize_underscored %>), polymorphic_path([@project, <%= model_name %>], set_filter: '1'), title: l(:label_<%= model_name_pluralize_underscored %>), class: 'icon icon-folder' %></li>
|
9
|
+
</ul>
|
@@ -0,0 +1 @@
|
|
1
|
+
<p><%%= form.check_box :is_filter %></p>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<ul>
|
2
|
+
<%% if @<%= model_name_underscored %> -%>
|
3
|
+
<li><%%= context_menu_link l(:button_edit), edit_<%= model_name_underscored %>_path(@<%= model_name_underscored %>), class: 'icon icon-edit', disabled: !@can[:edit] %></li>
|
4
|
+
<%% end %>
|
5
|
+
<li><%%= context_menu_link l(:button_delete), <%= model_name_pluralize_underscored %>_path(ids: @<%= model_name_underscored %>_ids, back_url: @back), method: :delete, data: {confirm: l(:text_are_you_sure)}, class: 'icon icon-del', disabled: !@can[:delete] %></li>
|
6
|
+
|
7
|
+
<%%= call_hook(:view_<%= model_name_pluralize_underscored %>_context_menu_end, {<%= model_name_underscored %>: @<%= model_name_underscored %>, <%= model_name_pluralize_underscored %>: @<%= model_name_pluralize_underscored %>, can: @can, back: @back, project: @project}) %>
|
8
|
+
</ul>
|
@@ -0,0 +1,158 @@
|
|
1
|
+
class <%= controller_class %>Controller < ApplicationController
|
2
|
+
|
3
|
+
menu_item :<%= model_name_pluralize_underscored %>
|
4
|
+
|
5
|
+
before_filter :find_<%= model_name_underscored %>, :only => [:show, :edit, :update]
|
6
|
+
before_filter :find_<%= model_name_pluralize_underscored %>, :only => [:context_menu, :bulk_edit, :bulk_update, :destroy]
|
7
|
+
<%- if project? -%>
|
8
|
+
before_filter :find_project
|
9
|
+
<%- end -%>
|
10
|
+
before_filter :authorize_global
|
11
|
+
|
12
|
+
helper :<%= model_name_pluralize_underscored %>
|
13
|
+
helper :custom_fields
|
14
|
+
helper :attachments
|
15
|
+
helper :issues
|
16
|
+
include_query_helpers
|
17
|
+
|
18
|
+
accept_api_auth :index, :show, :create, :update, :destroy
|
19
|
+
|
20
|
+
def index
|
21
|
+
index_for_easy_query(<%= model_name %>Query)
|
22
|
+
end
|
23
|
+
|
24
|
+
def show
|
25
|
+
respond_to do |format|
|
26
|
+
format.html
|
27
|
+
format.api
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def new
|
32
|
+
@<%= model_name_underscored %> = <%= model_name %>.new
|
33
|
+
<%- if project? -%>
|
34
|
+
@<%= model_name_underscored %>.project = @project
|
35
|
+
<%- end -%>
|
36
|
+
@<%= model_name_underscored %>.safe_attributes = params[:<%= model_name_underscored %>]
|
37
|
+
|
38
|
+
respond_to do |format|
|
39
|
+
format.html
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def create
|
44
|
+
@<%= model_name_underscored %> = <%= model_name %>.new
|
45
|
+
<%- if project? -%>
|
46
|
+
@<%= model_name_underscored %>.project = @project
|
47
|
+
<%- end -%>
|
48
|
+
@<%= model_name_underscored %>.safe_attributes = params[:<%= model_name_underscored %>]
|
49
|
+
@<%= model_name_underscored %>.save_attachments(params[:attachments] || (params[:<%= model_name_underscored %>] && params[:<%= model_name_underscored %>][:uploads]))
|
50
|
+
|
51
|
+
if @<%= model_name_underscored %>.save
|
52
|
+
respond_to do |format|
|
53
|
+
format.html {
|
54
|
+
flash[:notice] = l(:notice_successful_create)
|
55
|
+
redirect_back_or_default <%= model_name_underscored %>_path(@<%= model_name_underscored %>)
|
56
|
+
}
|
57
|
+
format.api { render :action => 'show', :status => :created, :location => <%= model_name_underscored %>_url(@<%= model_name_underscored %>) }
|
58
|
+
end
|
59
|
+
else
|
60
|
+
respond_to do |format|
|
61
|
+
format.html { render :action => 'new' }
|
62
|
+
format.api { render_validation_errors(@<%= model_name_underscored %>) }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def edit
|
68
|
+
@<%= model_name_underscored %>.safe_attributes = params[:<%= model_name_underscored %>]
|
69
|
+
|
70
|
+
respond_to do |format|
|
71
|
+
format.html
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def update
|
76
|
+
@<%= model_name_underscored %>.safe_attributes = params[:<%= model_name_underscored %>]
|
77
|
+
@<%= model_name_underscored %>.save_attachments(params[:attachments] || (params[:<%= model_name_underscored %>] && params[:<%= model_name_underscored %>][:uploads]))
|
78
|
+
|
79
|
+
if @<%= model_name_underscored %>.save
|
80
|
+
respond_to do |format|
|
81
|
+
format.html {
|
82
|
+
flash[:notice] = l(:notice_successful_update)
|
83
|
+
redirect_back_or_default <%= model_name_underscored %>_path(@<%= model_name_underscored %>)
|
84
|
+
}
|
85
|
+
format.api { render_api_ok }
|
86
|
+
end
|
87
|
+
else
|
88
|
+
respond_to do |format|
|
89
|
+
format.html { render :action => 'edit' }
|
90
|
+
format.api { render_validation_errors(@<%= model_name_underscored %>) }
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def destroy
|
96
|
+
@<%= model_name_pluralize_underscored %>.each do |<%= model_name_underscored %>|
|
97
|
+
<%= model_name_underscored %>.destroy
|
98
|
+
end
|
99
|
+
|
100
|
+
respond_to do |format|
|
101
|
+
format.html {
|
102
|
+
flash[:notice] = l(:notice_successful_delete)
|
103
|
+
redirect_back_or_default <%= model_name_pluralize_underscored %>_path
|
104
|
+
}
|
105
|
+
format.api { render_api_ok }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def bulk_edit
|
110
|
+
end
|
111
|
+
|
112
|
+
def bulk_update
|
113
|
+
end
|
114
|
+
|
115
|
+
def context_menu
|
116
|
+
if (@<%= model_name_pluralize_underscored %>.size == 1)
|
117
|
+
@<%= model_name_underscored %> = @<%= model_name_pluralize_underscored %>.first
|
118
|
+
end
|
119
|
+
@<%= model_name_underscored %>_ids = @<%= model_name_pluralize_underscored %>.map(&:id).sort
|
120
|
+
|
121
|
+
can_edit = @<%= model_name_pluralize_underscored %>.detect{|c| !c.editable?}.nil?
|
122
|
+
can_delete = @<%= model_name_pluralize_underscored %>.detect{|c| !c.deletable?}.nil?
|
123
|
+
@can = {:edit => can_edit, :delete => can_delete}
|
124
|
+
@back = back_url
|
125
|
+
|
126
|
+
@safe_attributes = @<%= model_name_pluralize_underscored %>.map(&:safe_attribute_names).reduce(:&)
|
127
|
+
|
128
|
+
render :layout => false
|
129
|
+
end
|
130
|
+
|
131
|
+
private
|
132
|
+
|
133
|
+
def find_<%= model_name_underscored %>
|
134
|
+
@<%= model_name_underscored %> = <%= model_name %>.find(params[:id])
|
135
|
+
rescue ActiveRecord::RecordNotFound
|
136
|
+
render_404
|
137
|
+
end
|
138
|
+
|
139
|
+
def find_<%= model_name_pluralize_underscored %>
|
140
|
+
@<%= model_name_pluralize_underscored %> = <%= model_name %>.visible.where(:id => (params[:id] || params[:ids])).to_a
|
141
|
+
raise ActiveRecord::RecordNotFound if @<%= model_name_pluralize_underscored %>.empty?
|
142
|
+
raise Unauthorized unless @<%= model_name_pluralize_underscored %>.all?(&:visible?)
|
143
|
+
@projects = @<%= model_name_pluralize_underscored %>.collect(&:project).compact.uniq
|
144
|
+
@project = @projects.first if @projects.size == 1
|
145
|
+
rescue ActiveRecord::RecordNotFound
|
146
|
+
render_404
|
147
|
+
end
|
148
|
+
|
149
|
+
<%- if project? -%>
|
150
|
+
def find_project
|
151
|
+
@project ||= @<%= model_name_underscored %>.project if !@<%= model_name_underscored %>.nil?
|
152
|
+
@project ||= Project.find(params[:project_id]) if !params[:project_id].blank?
|
153
|
+
rescue ActiveRecord::RecordNotFound
|
154
|
+
render_404
|
155
|
+
end
|
156
|
+
<%- end -%>
|
157
|
+
|
158
|
+
end
|