agile_rails 0.0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/MIT-LICENSE +20 -0
- data/README.md +285 -0
- data/Rakefile +39 -0
- data/agile_rails.gemspec +36 -0
- data/app/assets/fonts/ibm-plex-sans-300.woff2 +0 -0
- data/app/assets/fonts/ibm-plex-sans-400.woff2 +0 -0
- data/app/assets/fonts/ibm-plex-sans-500.woff2 +0 -0
- data/app/assets/fonts/ibm-plex-sans-600.woff2 +0 -0
- data/app/assets/fonts/ibm-plex-sans-700.woff2 +0 -0
- data/app/assets/fonts/ibm-plex-sans-italic.woff2 +0 -0
- data/app/assets/images/32px.png +0 -0
- data/app/assets/images/throbber.gif +0 -0
- data/app/assets/javascripts/agile/agile.js +1489 -0
- data/app/assets/javascripts/agile/jquery-migrate.js +702 -0
- data/app/assets/javascripts/agile/jquery.bpopup.js +372 -0
- data/app/assets/javascripts/agile/jquery.datetimepicker.js +1353 -0
- data/app/assets/javascripts/agile/jstree.min.js +6 -0
- data/app/assets/javascripts/agile/select-multiple.js +459 -0
- data/app/assets/javascripts/agile/some_scripts.js +33 -0
- data/app/assets/javascripts/agile.js +22 -0
- data/app/assets/javascripts/agile_application.js +22 -0
- data/app/assets/javascripts/agile_editor.js +22 -0
- data/app/assets/stylesheets/agile/agile.css +1882 -0
- data/app/assets/stylesheets/agile/agile_apps.css +149 -0
- data/app/assets/stylesheets/agile/jquery.datetimepicker.css +304 -0
- data/app/assets/stylesheets/agile/jstree.css +1107 -0
- data/app/assets/stylesheets/agile/select-multiple.css +110 -0
- data/app/assets/stylesheets/agile/th-bg.png +0 -0
- data/app/assets/stylesheets/agile/theme.css +49 -0
- data/app/assets/stylesheets/agile.css +21 -0
- data/app/assets/stylesheets/agile_application.css +20 -0
- data/app/assets/stylesheets/agile_editor.css +19 -0
- data/app/controllers/agile_application_controller.rb +735 -0
- data/app/controllers/agile_common_controller.rb +345 -0
- data/app/controllers/agile_controller.rb +977 -0
- data/app/controllers/agile_main_controller.rb +36 -0
- data/app/controls/agile_control.rb +120 -0
- data/app/controls/agile_report.rb +364 -0
- data/app/controls/ar_category_control.rb +39 -0
- data/app/controls/ar_help_control.rb +139 -0
- data/app/controls/ar_image_control.rb +180 -0
- data/app/controls/ar_journal_control.rb +47 -0
- data/app/controls/ar_menu_item_control.rb +55 -0
- data/app/controls/ar_page_control.rb +64 -0
- data/app/controls/ar_poll_result_control.rb +84 -0
- data/app/controls/ar_setup_control.rb +62 -0
- data/app/controls/belongs_to_control.rb +61 -0
- data/app/controls/browse_models_control.rb +98 -0
- data/app/controls/settings_form_control.rb +137 -0
- data/app/forms/agile_help.yml +112 -0
- data/app/forms/agile_menu.yml +140 -0
- data/app/forms/agile_report_defaults.yml +39 -0
- data/app/forms/all_options.yml +810 -0
- data/app/forms/ar_ad.yml +121 -0
- data/app/forms/ar_big_table.yml +60 -0
- data/app/forms/ar_big_table_value.yml +52 -0
- data/app/forms/ar_browse_fields.yml +35 -0
- data/app/forms/ar_browse_models.yml +48 -0
- data/app/forms/ar_category.yml +73 -0
- data/app/forms/ar_category_as_tree.yml +31 -0
- data/app/forms/ar_design.yml +75 -0
- data/app/forms/ar_filter.yml +52 -0
- data/app/forms/ar_folder_permission.yml +56 -0
- data/app/forms/ar_folder_rule.yml +48 -0
- data/app/forms/ar_gallery.yml +55 -0
- data/app/forms/ar_image.yml +126 -0
- data/app/forms/ar_image_search.yml +83 -0
- data/app/forms/ar_journal.yml +76 -0
- data/app/forms/ar_json_ld.yml +56 -0
- data/app/forms/ar_key_value.yml +33 -0
- data/app/forms/ar_key_value_store.yml +33 -0
- data/app/forms/ar_link.yml +60 -0
- data/app/forms/ar_menu.yml +67 -0
- data/app/forms/ar_menu_item.yml +141 -0
- data/app/forms/ar_page.yml +187 -0
- data/app/forms/ar_part.yml +91 -0
- data/app/forms/ar_permission.yml +52 -0
- data/app/forms/ar_permission_rule.yml +40 -0
- data/app/forms/ar_piece.yml +106 -0
- data/app/forms/ar_policy.yml +64 -0
- data/app/forms/ar_policy_rule.yml +42 -0
- data/app/forms/ar_policy_rule_nocms.yml +40 -0
- data/app/forms/ar_poll.yml +118 -0
- data/app/forms/ar_poll_item.yml +78 -0
- data/app/forms/ar_poll_result.yml +88 -0
- data/app/forms/ar_poll_result_export.yml +35 -0
- data/app/forms/ar_removed_url.yml +41 -0
- data/app/forms/ar_role.yml +43 -0
- data/app/forms/ar_seo.yml +32 -0
- data/app/forms/ar_setup.yml +45 -0
- data/app/forms/ar_site.yml +149 -0
- data/app/forms/ar_steps_template.yml +51 -0
- data/app/forms/ar_user.yml +140 -0
- data/app/forms/ar_user_role.yml +57 -0
- data/app/forms/help/dc_category_as_tree.en +4 -0
- data/app/forms/help/dc_category_as_tree.sl +5 -0
- data/app/forms/json_ld_schema.yml +168 -0
- data/app/helpers/agile_application_helper.rb +1162 -0
- data/app/helpers/agile_category_helper.rb +128 -0
- data/app/helpers/agile_common_helper.rb +308 -0
- data/app/helpers/agile_edit_helper.rb +645 -0
- data/app/helpers/agile_helper.rb +509 -0
- data/app/helpers/agile_index_helper.rb +677 -0
- data/app/helpers/ar_image_helper.rb +128 -0
- data/app/models/agile_form_fields/action.rb +61 -0
- data/app/models/agile_form_fields/agile_form_field.rb +322 -0
- data/app/models/agile_form_fields/belongs_to.rb +112 -0
- data/app/models/agile_form_fields/check_box.rb +73 -0
- data/app/models/agile_form_fields/comment.rb +62 -0
- data/app/models/agile_form_fields/date_picker.rb +104 -0
- data/app/models/agile_form_fields/date_select.rb +68 -0
- data/app/models/agile_form_fields/datetime_picker.rb +88 -0
- data/app/models/agile_form_fields/datetime_select.rb +73 -0
- data/app/models/agile_form_fields/file_field.rb +52 -0
- data/app/models/agile_form_fields/file_select.rb +69 -0
- data/app/models/agile_form_fields/hidden_field.rb +51 -0
- data/app/models/agile_form_fields/html_field.rb +69 -0
- data/app/models/agile_form_fields/journal_diff.rb +62 -0
- data/app/models/agile_form_fields/link_to.rb +69 -0
- data/app/models/agile_form_fields/method.rb +66 -0
- data/app/models/agile_form_fields/multitext_autocomplete.rb +215 -0
- data/app/models/agile_form_fields/number_field.rb +92 -0
- data/app/models/agile_form_fields/password_field.rb +63 -0
- data/app/models/agile_form_fields/radio_button.rb +95 -0
- data/app/models/agile_form_fields/readonly.rb +77 -0
- data/app/models/agile_form_fields/select.rb +281 -0
- data/app/models/agile_form_fields/submit_tag.rb +58 -0
- data/app/models/agile_form_fields/text_area.rb +61 -0
- data/app/models/agile_form_fields/text_autocomplete.rb +171 -0
- data/app/models/agile_form_fields/text_field.rb +55 -0
- data/app/models/agile_form_fields/text_with_select.rb +94 -0
- data/app/models/agile_form_fields/tree_select.rb +170 -0
- data/app/models/ar_big_table.rb +82 -0
- data/app/models/ar_big_table_value.rb +53 -0
- data/app/models/ar_category.rb +109 -0
- data/app/models/ar_design.rb +116 -0
- data/app/models/ar_filter.rb +200 -0
- data/app/models/ar_folder_permission.rb +50 -0
- data/app/models/ar_folder_rule.rb +47 -0
- data/app/models/ar_gallery.rb +53 -0
- data/app/models/ar_image.rb +198 -0
- data/app/models/ar_internals.rb +60 -0
- data/app/models/ar_journal.rb +46 -0
- data/app/models/ar_json_ld.rb +131 -0
- data/app/models/ar_key_value_store.rb +128 -0
- data/app/models/ar_link.rb +48 -0
- data/app/models/ar_memory.rb +172 -0
- data/app/models/ar_menu.rb +144 -0
- data/app/models/ar_menu_item.rb +106 -0
- data/app/models/ar_page.rb +74 -0
- data/app/models/ar_part.rb +66 -0
- data/app/models/ar_permission.rb +180 -0
- data/app/models/ar_permission_rule.rb +65 -0
- data/app/models/ar_policy.rb +78 -0
- data/app/models/ar_policy_rule.rb +65 -0
- data/app/models/ar_poll.rb +74 -0
- data/app/models/ar_poll_item.rb +47 -0
- data/app/models/ar_poll_result.rb +38 -0
- data/app/models/ar_removed_url.rb +42 -0
- data/app/models/ar_role.rb +84 -0
- data/app/models/ar_setup.rb +115 -0
- data/app/models/ar_site.rb +68 -0
- data/app/models/ar_temp.rb +150 -0
- data/app/models/ar_user.rb +72 -0
- data/app/models/ar_user_group.rb +38 -0
- data/app/models/ar_user_role.rb +54 -0
- data/app/models/ar_visit.rb +41 -0
- data/app/models/concerns/ar_page_concern.rb +128 -0
- data/app/models/concerns/ar_part_concern.rb +48 -0
- data/app/models/concerns/ar_piece_concern.rb +48 -0
- data/app/models/concerns/ar_policy_rule_concern.rb +87 -0
- data/app/models/concerns/ar_seo_concern.rb +66 -0
- data/app/models/concerns/ar_site_concern.rb +103 -0
- data/app/models/concerns/ar_user_concern.rb +195 -0
- data/app/renderers/agile_common_renderer.rb +93 -0
- data/app/renderers/agile_renderer.rb +59 -0
- data/app/renderers/ar_ad_renderer.rb +219 -0
- data/app/renderers/ar_captcha_renderer.rb +113 -0
- data/app/renderers/ar_common_renderer.rb +90 -0
- data/app/renderers/ar_gallery_renderer.rb +107 -0
- data/app/renderers/ar_menu_renderer.rb +195 -0
- data/app/renderers/ar_page_renderer.rb +147 -0
- data/app/renderers/ar_part_renderer.rb +235 -0
- data/app/renderers/ar_piece_renderer.rb +119 -0
- data/app/renderers/ar_poll_renderer.rb +272 -0
- data/app/views/agile/_edit_stuff.html.erb +57 -0
- data/app/views/agile/_form.html.erb +24 -0
- data/app/views/agile/_result.html.erb +28 -0
- data/app/views/agile/edit.html.erb +13 -0
- data/app/views/agile/error.html.erb +2 -0
- data/app/views/agile/index.html.erb +14 -0
- data/app/views/agile/login.html.erb +19 -0
- data/app/views/agile/new.html.erb +12 -0
- data/app/views/agile_common/_help.html.erb +18 -0
- data/app/views/agile_common/_iframe_edit.html.erb +2 -0
- data/app/views/agile_common/paste_clipboard.html.erb +17 -0
- data/app/views/layouts/agile.html.erb +17 -0
- data/app/views/layouts/content.html.erb +20 -0
- data/app/views/models/dump_models.html.erb +47 -0
- data/config/initializers/kaminari_patch.rb +56 -0
- data/config/locales/agile_de.yml +138 -0
- data/config/locales/agile_en.yml +162 -0
- data/config/locales/agile_sl.yml +163 -0
- data/config/locales/datetimepicker.yml +19 -0
- data/config/locales/de.yml +231 -0
- data/config/locales/en.yml +13 -0
- data/config/locales/kaminari.yml +26 -0
- data/config/locales/models_en.yml +1032 -0
- data/config/locales/models_sl.yml +1065 -0
- data/config/locales/sl.yml +211 -0
- data/db/migrate/20240120160001_add_sessions_table.rb +12 -0
- data/db/migrate/20240120160002_ar_big_table.rb +17 -0
- data/db/migrate/20240120160003_ar_big_table_value.rb +18 -0
- data/db/migrate/20240120160004_ar_category.rb +22 -0
- data/db/migrate/20240120160005_ar_design.rb +20 -0
- data/db/migrate/20240120160006_ar_filter.rb +17 -0
- data/db/migrate/20240120160007_ar_gallery.rb +21 -0
- data/db/migrate/20240120160008_ar_journal.rb +19 -0
- data/db/migrate/20240120160009_ar_key_value_store.rb +11 -0
- data/db/migrate/20240120160010_ar_link.rb +19 -0
- data/db/migrate/20240120160011_ar_memory.rb +8 -0
- data/db/migrate/20240120160012_ar_menu.rb +21 -0
- data/db/migrate/20240120160013_ar_menu_item.rb +28 -0
- data/db/migrate/20240120160014_ar_page.rb +50 -0
- data/db/migrate/20240120160015_ar_part.rb +33 -0
- data/db/migrate/20240120160016_ar_permission.rb +16 -0
- data/db/migrate/20240120160017_ar_permission_rule.rb +17 -0
- data/db/migrate/20240120160018_ar_piece.rb +28 -0
- data/db/migrate/20240120160019_ar_policy.rb +21 -0
- data/db/migrate/20240120160020_ar_policy_rule.rb +18 -0
- data/db/migrate/20240120160021_ar_poll.rb +27 -0
- data/db/migrate/20240120160022_ar_poll_item.rb +23 -0
- data/db/migrate/20240120160023_ar_poll_result.rb +14 -0
- data/db/migrate/20240120160024_ar_removed_url.rb +16 -0
- data/db/migrate/20240120160025_ar_role.rb +17 -0
- data/db/migrate/20240120160026_ar_site.rb +37 -0
- data/db/migrate/20240120160027_ar_temp.rb +11 -0
- data/db/migrate/20240120160028_ar_user.rb +42 -0
- data/db/migrate/20240120160029_ar_user_group.rb +12 -0
- data/db/migrate/20240120160030_ar_user_role.rb +18 -0
- data/db/migrate/20240120160031_ar_visit.rb +15 -0
- data/db/migrate/20240703016001_ar_setup.rb +16 -0
- data/db/migrate/20240703016002_ar_folder_permission.rb +15 -0
- data/db/migrate/20240703016003_ar_folder_rule.rb +14 -0
- data/db/migrate/20250115000001_ar_image.rb +25 -0
- data/lib/agile/configuration.rb +43 -0
- data/lib/agile/engine.rb +29 -0
- data/lib/agile/version.rb +27 -0
- data/lib/agile.rb +282 -0
- data/lib/agile_rails.rb +1 -0
- data/lib/generators/agile/USAGE +11 -0
- data/lib/generators/agile/new_form_generator.rb +369 -0
- data/lib/generators/convert_to_ar/convert_to_ar_generator.rb +158 -0
- data/lib/tasks/agile_db_clone.rake +132 -0
- data/lib/tasks/agile_db_export_to_yaml.rake +37 -0
- data/lib/tasks/agile_db_migrate.rake +35 -0
- metadata +414 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '08739e1d1287c45f07d7b2482c2fb79e59d9e80353634dfa9ef6656274407839'
|
4
|
+
data.tar.gz: 5a903cfee39845a30cd8255265fdabb98d5d34c2fc901efe1735d3a484e05111
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ffb1a266a35777275e6d81702e7a0d53ca31491e3a6bfe63e6fa2a803714922d4d2060ed5eed674ed45abae70e1e87837ee475fe85f9f0bffc33cc38148bd700
|
7
|
+
data.tar.gz: 6d6951e3be9ce0d1b1b98f02fbb964ef6ef50b449318f1f4cf1ac796b000f1754de4a1ffcf22fa6e4a0b7e5bd9ff29004e7ddd92991734c29fa261a86543ec1c
|
data/CHANGELOG.md
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2024+ Damjan Rems
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,285 @@
|
|
1
|
+
# AgileRails
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/agile_rails)
|
4
|
+
[](https://rubygems.org/gems/agile_rails)
|
5
|
+
|
6
|
+
You can find introduction videos on YouTube: https://www.youtube.com/playlist?list=PLM66pztpUC0DVAqZvIAqH3Khb_RzJdD3W
|
7
|
+
|
8
|
+
Agile Rails simplifies the programming of business Intranet applications.
|
9
|
+
Minimal database experience and only basic programming skills are needed
|
10
|
+
to create a data entry program. You can do it in 6 simple steps.
|
11
|
+
|
12
|
+
Step 1: Know your data and create Rails migration and model<br>
|
13
|
+
Step 2: Generate Agile Rails form<br>
|
14
|
+
Step 3: Edit form to your requirements<br>
|
15
|
+
Step 4: Define Labels and Help Text<br>
|
16
|
+
Step 5: Create additional logic in Controls File (if required)<br>
|
17
|
+
Step 6: Include in application menu<br>
|
18
|
+
|
19
|
+
Most of the time, you will end up with just 3 source files.
|
20
|
+
|
21
|
+
<b>1. Migration file:</b> Rails uses migrations to make changes to the database
|
22
|
+
schema, such as creating tables or altering columns.
|
23
|
+
|
24
|
+
An example of migration file.
|
25
|
+
```ruby
|
26
|
+
class Diary < ActiveRecord::Migration[7.0]
|
27
|
+
def change
|
28
|
+
create_table :diaries do |t|
|
29
|
+
t.string :title
|
30
|
+
t.text :body
|
31
|
+
t.datetime :time_begin
|
32
|
+
t.integer :duration
|
33
|
+
t.text :search
|
34
|
+
t.boolean :closed, default: true
|
35
|
+
t.integer :ar_user_id
|
36
|
+
|
37
|
+
t.timestamps
|
38
|
+
|
39
|
+
t.index :ar_user_id
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
<b>2 Model file:</b> Model's primary purposes is to represent the data and logic
|
46
|
+
of the application. It contains business logic, relations between data, validations
|
47
|
+
|
48
|
+
An example of a typical model file:
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
class Diary < ApplicationRecord
|
52
|
+
|
53
|
+
validates :title, presence: true
|
54
|
+
validates :time_begin, presence: true
|
55
|
+
validates :duration, presence: true
|
56
|
+
|
57
|
+
before_save :fill_search_field
|
58
|
+
|
59
|
+
#############################################################################
|
60
|
+
# Before save remove all html tags from body field and put data into search field.
|
61
|
+
#############################################################################
|
62
|
+
def fill_search_field
|
63
|
+
text = ActionView::Base.full_sanitizer.sanitize(self.body, :tags=>[]).to_s
|
64
|
+
text.gsub!(/\,|\.|\)|\(|\:|\;|\?/,'')
|
65
|
+
text.gsub!(' ',' ')
|
66
|
+
text.gsub!('>',' ')
|
67
|
+
text.gsub!('<',' ')
|
68
|
+
text.squish!
|
69
|
+
|
70
|
+
self.search = (self.title + text).downcase
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
<b>3. Form file:</b> AgileRails Form's purpose is to define data entry fields and actions which can be taken on data.
|
77
|
+
It contains two main sections.
|
78
|
+
|
79
|
+
<b>index:</b> Defines view on table data (data_set) and actions that can be performed on
|
80
|
+
database documents or set of documents.<br>
|
81
|
+
<b>form:</b> Defines data entry fields for adding, editing or viewing a database record.<br>
|
82
|
+
|
83
|
+
Form is written in the YAML markup language which is human friendly and can be edited with any
|
84
|
+
text editor.
|
85
|
+
|
86
|
+
Example of form file:
|
87
|
+
|
88
|
+
```yaml
|
89
|
+
table: note
|
90
|
+
|
91
|
+
index:
|
92
|
+
filter: search as text_field
|
93
|
+
actions: standard
|
94
|
+
|
95
|
+
result_set:
|
96
|
+
filter: current_users_documents
|
97
|
+
actions:
|
98
|
+
1: edit
|
99
|
+
2: delete
|
100
|
+
|
101
|
+
columns:
|
102
|
+
10:
|
103
|
+
name: title
|
104
|
+
width: 25%
|
105
|
+
20:
|
106
|
+
name: time_started
|
107
|
+
width: 10%
|
108
|
+
format: '%d.%m.%Y'
|
109
|
+
30:
|
110
|
+
name: duration
|
111
|
+
|
112
|
+
form:
|
113
|
+
fields:
|
114
|
+
10:
|
115
|
+
name: user_id
|
116
|
+
type: readonly
|
117
|
+
eval: dc_name4_id,dc_user,name
|
118
|
+
default:
|
119
|
+
eval: 'session[:user_id]'
|
120
|
+
20:
|
121
|
+
name: title
|
122
|
+
type: text_field
|
123
|
+
size: 50
|
124
|
+
30:
|
125
|
+
name: time_started
|
126
|
+
type: datetime_picker
|
127
|
+
options:
|
128
|
+
step: 15
|
129
|
+
40:
|
130
|
+
name: duration
|
131
|
+
type: select
|
132
|
+
50:
|
133
|
+
name: body
|
134
|
+
type: html_field
|
135
|
+
options: "height: 500"
|
136
|
+
```
|
137
|
+
|
138
|
+
Add data entry field labels and help text to your project locales files.
|
139
|
+
```yaml
|
140
|
+
en:
|
141
|
+
helpers:
|
142
|
+
label:
|
143
|
+
diary:
|
144
|
+
table_title: Diary
|
145
|
+
choices_for_duration: "10 min:10,15 min:15,20 min:20,30 min:30,45 min:45,1 hour:60,1 hour 30 min:90,2 hours:120,2 hours 30 min:150,3 hours:180,4 hours:240,5 hours:300,6 hours:360,7 hours:420,8 hours:480"
|
146
|
+
|
147
|
+
title: Title
|
148
|
+
body: Description
|
149
|
+
time_started: Start time
|
150
|
+
duration: Duration
|
151
|
+
search: Search
|
152
|
+
ar_user_id: Owner
|
153
|
+
|
154
|
+
help:
|
155
|
+
diary:
|
156
|
+
title: Short title of event
|
157
|
+
body: Description of event or note
|
158
|
+
time_started: Time or date when note is created or event started
|
159
|
+
duration: Duration of event
|
160
|
+
search: Body text striped of html code for text searching
|
161
|
+
ar_user_id: Owner of the note
|
162
|
+
```
|
163
|
+
Combination of three source files and localisation data makes application
|
164
|
+
data entry program. Application data entry program implements all data
|
165
|
+
entry operations on a database:<br>
|
166
|
+
<li>add new document<br>
|
167
|
+
<li>edit document<br>
|
168
|
+
<li>delete document<br>
|
169
|
+
<li>view document
|
170
|
+
|
171
|
+
<br>Add data entry application into your application menu:
|
172
|
+
|
173
|
+
```ruby
|
174
|
+
agile_link_to('Diary', 'book', { table: 'diary' }, target: 'iframe_edit')
|
175
|
+
```
|
176
|
+
|
177
|
+
And if you need advanced program logic, you can implement it in
|
178
|
+
the control file. Control files code is injected into agile
|
179
|
+
controller during form load and provides additional control logic required
|
180
|
+
by data entry program. In control files you can control program workflow by
|
181
|
+
implementing callback methods.
|
182
|
+
- *before_new
|
183
|
+
- new_record
|
184
|
+
- dup_record
|
185
|
+
- *before_edit
|
186
|
+
- *before_save
|
187
|
+
- after_save
|
188
|
+
- *before_delete
|
189
|
+
- after_delete
|
190
|
+
|
191
|
+
Methods marked with asterisk can also effect flow of the application. If method return false
|
192
|
+
(not nil but FalseClass) normal flow of the program is interrupted and last operation is canceled
|
193
|
+
|
194
|
+
```ruby
|
195
|
+
######################################################################
|
196
|
+
# AgileRails controls for Diary database table
|
197
|
+
######################################################################
|
198
|
+
module DiaryControl
|
199
|
+
|
200
|
+
######################################################################
|
201
|
+
# Fill in currently logged in user's data on new record action.
|
202
|
+
######################################################################
|
203
|
+
def new_record
|
204
|
+
@record.user_id = session[:user_id]
|
205
|
+
@record.time_started = Time.now.localtime
|
206
|
+
end
|
207
|
+
|
208
|
+
###########################################################################
|
209
|
+
# Filter only owned documents to logged on user
|
210
|
+
###########################################################################
|
211
|
+
def current_user_documents
|
212
|
+
user_filter_options(Note).and(ar_user_id: session[:user_id]).order(id: 'desc')
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
```
|
217
|
+
<br>
|
218
|
+
|
219
|
+
## Features
|
220
|
+
AgileRails uses Ruby on Rails, one of the most popular frameworks for
|
221
|
+
building websites. Ruby on Rails guarantees highest level of application security
|
222
|
+
and huge base of extensions which will help you when your application grows.
|
223
|
+
<br><br>
|
224
|
+
AgileRails is also full-featured CMS which was build to run multiple web sites on single Ruby on Rails instance.
|
225
|
+
All sites can share design, data, users ...
|
226
|
+
<br><br>
|
227
|
+
AgileRails has built-in admin friendly two level role based application access system.
|
228
|
+
On the first level administrator defines roles and roles rights as web site policies. Policies define
|
229
|
+
if user can view content or not or if user can edit content. Roles are then assigned to users
|
230
|
+
and policies are assigned to documents (web content), parts of content, menus ...
|
231
|
+
<br>
|
232
|
+
Second level defines roles which can access database data. Each database table can have defined which
|
233
|
+
user roles can read, edit, create or delete records in a table.
|
234
|
+
<br><br>
|
235
|
+
Integrates journal with options to undo single field
|
236
|
+
<br><br>
|
237
|
+
Integrates CK Editor as HTML editor and ElFinder file manager with with drag & drop support through
|
238
|
+
agile_rails_html_editor gem.
|
239
|
+
|
240
|
+
## Installation
|
241
|
+
|
242
|
+
Go and [jumpstart](https://github.com/agile-rails/agile-rails-jumpstart)
|
243
|
+
internal portal application with AgileRails in just few minutes.
|
244
|
+
|
245
|
+
Compatibility
|
246
|
+
-------------
|
247
|
+
|
248
|
+
Technology behind AgileRails is being actively developed since 2012 and has been live tested in production
|
249
|
+
since early days. It runs against latest technology Ruby (3.3), Rails (7.1)
|
250
|
+
and had so far little or no problems advancing to latest versions of Ruby or Ruby on Rails.
|
251
|
+
|
252
|
+
Documentation
|
253
|
+
-------------
|
254
|
+
|
255
|
+
Please see the agile-rails.com website for more information:
|
256
|
+
[agilerails.zop.si](http://agilerails.zop.si)
|
257
|
+
|
258
|
+
License (MIT LICENCE)
|
259
|
+
---------------------
|
260
|
+
|
261
|
+
Copyright (c) 2024+ Damjan Rems
|
262
|
+
|
263
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
264
|
+
a copy of this software and associated documentation files (the
|
265
|
+
"Software"), to deal in the Software without restriction, including
|
266
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
267
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
268
|
+
permit persons to whom the Software is furnished to do so, subject to
|
269
|
+
the following conditions:
|
270
|
+
|
271
|
+
The above copyright notice and this permission notice shall be
|
272
|
+
included in all copies or substantial portions of the Software.
|
273
|
+
|
274
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
275
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
276
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
277
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
278
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
279
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
280
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
281
|
+
|
282
|
+
Credits
|
283
|
+
-------
|
284
|
+
|
285
|
+
Damjan Rems: damjan dot rems at gmail dot com
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'RadAr'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
Bundler::GemHelper.install_tasks
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
|
31
|
+
Rake::TestTask.new(:test) do |t|
|
32
|
+
t.libs << 'lib'
|
33
|
+
t.libs << 'test'
|
34
|
+
t.pattern = 'test/**/*_test.rb'
|
35
|
+
t.verbose = false
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
task :default => :test
|
data/agile_rails.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright 2024+ Damjan Rems
|
2
|
+
|
3
|
+
$:.push File.expand_path('../lib', __FILE__)
|
4
|
+
|
5
|
+
# Maintain gem's version:
|
6
|
+
require 'agile/version'
|
7
|
+
|
8
|
+
# Describe gem and declare its dependencies:
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
s.name = 'agile_rails'
|
11
|
+
s.version = Agile::VERSION
|
12
|
+
s.authors = ['Damjan Rems']
|
13
|
+
s.email = ['damjan.rems@gmail.com']
|
14
|
+
s.homepage = 'https://agile-rails.com'
|
15
|
+
s.summary = 'Agile Rails: Agile application development tool and CMS for Ruby on Rails'
|
16
|
+
s.description = 'Agile Rails, development tool for agile development of in-house (Intranet, business, private cloud) applications as well as CMS for creating complex, data-entry intensive web sites.'
|
17
|
+
s.license = 'MIT'
|
18
|
+
s.files = Dir['{app,config,db,lib}/**/*'] + %w[MIT-LICENSE Rakefile README.md CHANGELOG.md agile_rails.gemspec]
|
19
|
+
#s.test_files = Dir['test/**/*']
|
20
|
+
|
21
|
+
s.metadata['homepage_uri'] = s.homepage
|
22
|
+
s.metadata['source_code_uri'] = 'https://github.com/agile-rails'
|
23
|
+
s.metadata['changelog_uri'] = 'https://github.com/agile-rails/changelog'
|
24
|
+
|
25
|
+
s.required_ruby_version = '> 3.1'
|
26
|
+
|
27
|
+
s.add_dependency 'jquery-rails'
|
28
|
+
s.add_dependency 'jquery-ui-rails'
|
29
|
+
s.add_dependency 'non-digest-assets'
|
30
|
+
s.add_dependency 'rails'
|
31
|
+
|
32
|
+
s.add_dependency 'bcrypt'
|
33
|
+
s.add_dependency 'drg_material_icons'
|
34
|
+
s.add_dependency 'kaminari'
|
35
|
+
s.add_dependency 'kaminari-actionview'
|
36
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|