agile_rails 0.0.0.1 → 0.0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -2
- data/README.md +26 -19
- data/agile_rails.gemspec +4 -4
- data/app/assets/javascripts/agile/agile.js +32 -1
- data/app/assets/stylesheets/agile/agile.css +21 -0
- data/app/controllers/agile_controller.rb +1 -0
- data/app/controls/agile_report.rb +9 -0
- data/app/controls/ar_setup_control.rb +2 -3
- data/app/forms/ar_category_as_tree.yml +1 -2
- data/app/helpers/agile_application_helper.rb +97 -96
- data/app/helpers/agile_category_helper.rb +2 -2
- data/app/helpers/agile_edit_helper.rb +16 -16
- data/app/helpers/agile_index_helper.rb +71 -64
- data/app/models/agile_form_fields/datetime_picker.rb +0 -1
- data/app/models/ar_image.rb +2 -8
- data/app/models/ar_setup.rb +3 -6
- data/app/renderers/ar_common_renderer.rb +12 -12
- data/app/renderers/ar_poll_renderer.rb +23 -20
- data/lib/agile/version.rb +2 -2
- metadata +7 -10
- data/app/models/ar_json_ld.rb +0 -131
- data/app/models/concerns/ar_piece_concern.rb +0 -48
- data/app/models/concerns/ar_policy_rule_concern.rb +0 -87
- data/app/models/concerns/ar_seo_concern.rb +0 -66
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0bd422185ce90e64f9e1df6198d36c58a7fe951c54e7ba874a99aa12d9c80bf3
|
|
4
|
+
data.tar.gz: 843970c74ad00cc5784620361886a4532637a746de2833a77691cbea5852f140
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b06646b7230db54483a3164e8a1f06ab1fd74ed5713dc464067762d85008ac58a33de789980a5937cd3c7ede05392ede91c5d98c29b39d2d25b280914bf98577
|
|
7
|
+
data.tar.gz: 5ed95ba34ac30d4ca3d816fedf2220b569dd24036ba92a8c4c0f00d4d280dbdfb18313d1597fe61726b8625dc63c45a567bb67c9447b83f0b1c37f4b445781e1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -3,23 +3,27 @@
|
|
|
3
3
|
[](https://rubygems.org/gems/agile_rails)
|
|
4
4
|
[](https://rubygems.org/gems/agile_rails)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Watch introduction videos on YouTube: https://www.youtube.com/playlist?list=PLM66pztpUC0DVAqZvIAqH3Khb_RzJdD3W
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## What is AgileRails
|
|
9
|
+
|
|
10
|
+
AgileRails simplifies the programming of business Intranet applications with Ruby on Rails.
|
|
9
11
|
Minimal database experience and only basic programming skills are needed
|
|
10
12
|
to create a data entry program. You can do it in 6 simple steps.
|
|
11
13
|
|
|
12
14
|
Step 1: Know your data and create Rails migration and model<br>
|
|
13
|
-
Step 2: Generate
|
|
15
|
+
Step 2: Generate AgileRails form<br>
|
|
14
16
|
Step 3: Edit form to your requirements<br>
|
|
15
17
|
Step 4: Define Labels and Help Text<br>
|
|
16
18
|
Step 5: Create additional logic in Controls File (if required)<br>
|
|
17
19
|
Step 6: Include in application menu<br>
|
|
18
20
|
|
|
19
|
-
Most of the time, you will end up with
|
|
21
|
+
Most of the time, you will end up with 3 source files.
|
|
22
|
+
|
|
23
|
+
#### 1. Migration file
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
schema, such as creating tables or altering
|
|
25
|
+
Rails uses migrations to make changes to the database
|
|
26
|
+
schema, such as creating tables or altering table attributes.
|
|
23
27
|
|
|
24
28
|
An example of migration file.
|
|
25
29
|
```ruby
|
|
@@ -42,7 +46,10 @@ class Diary < ActiveRecord::Migration[7.0]
|
|
|
42
46
|
end
|
|
43
47
|
```
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
|
|
50
|
+
#### 2. Model file
|
|
51
|
+
|
|
52
|
+
Model's primary purposes is to represent the data and logic
|
|
46
53
|
of the application. It contains business logic, relations between data, validations
|
|
47
54
|
|
|
48
55
|
An example of a typical model file:
|
|
@@ -73,7 +80,10 @@ end
|
|
|
73
80
|
end
|
|
74
81
|
```
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
|
|
84
|
+
#### 3. Form file
|
|
85
|
+
|
|
86
|
+
AgileRails Form's purpose is to define data entry fields and actions which can be taken on data.
|
|
77
87
|
It contains two main sections.
|
|
78
88
|
|
|
79
89
|
<b>index:</b> Defines view on table data (data_set) and actions that can be performed on
|
|
@@ -229,31 +239,28 @@ On the first level administrator defines roles and roles rights as web site poli
|
|
|
229
239
|
if user can view content or not or if user can edit content. Roles are then assigned to users
|
|
230
240
|
and policies are assigned to documents (web content), parts of content, menus ...
|
|
231
241
|
<br>
|
|
232
|
-
Second level defines roles
|
|
233
|
-
user roles can read, edit, create or delete records
|
|
242
|
+
Second level defines roles to access database tables. Each table can have defined which
|
|
243
|
+
user roles can read, edit, create or delete records.
|
|
234
244
|
<br><br>
|
|
235
245
|
Integrates journal with options to undo single field
|
|
236
246
|
<br><br>
|
|
237
247
|
Integrates CK Editor as HTML editor and ElFinder file manager with with drag & drop support through
|
|
238
248
|
agile_rails_html_editor gem.
|
|
239
249
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
Go and [jumpstart](https://github.com/agile-rails/
|
|
243
|
-
|
|
250
|
+
Installation
|
|
251
|
+
------------
|
|
252
|
+
Go and [jumpstart](https://github.com/agile-rails/startup)
|
|
253
|
+
Intranet portal application with AgileRails in just few minutes.
|
|
244
254
|
|
|
245
255
|
Compatibility
|
|
246
256
|
-------------
|
|
247
|
-
|
|
248
257
|
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.
|
|
258
|
+
since early days. It runs against latest technology Ruby (>= 3.2), Rails (>= 7.2)
|
|
250
259
|
and had so far little or no problems advancing to latest versions of Ruby or Ruby on Rails.
|
|
251
260
|
|
|
252
261
|
Documentation
|
|
253
262
|
-------------
|
|
254
|
-
|
|
255
|
-
Please see the agile-rails.com website for more information:
|
|
256
|
-
[agilerails.zop.si](http://agilerails.zop.si)
|
|
263
|
+
Visit the [agile-rails.com](https://agile-rails.com) website for more information:
|
|
257
264
|
|
|
258
265
|
License (MIT LICENCE)
|
|
259
266
|
---------------------
|
data/agile_rails.gemspec
CHANGED
|
@@ -12,15 +12,15 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
s.authors = ['Damjan Rems']
|
|
13
13
|
s.email = ['damjan.rems@gmail.com']
|
|
14
14
|
s.homepage = 'https://agile-rails.com'
|
|
15
|
-
s.summary = '
|
|
16
|
-
s.description = '
|
|
15
|
+
s.summary = 'AgileRails: Agile business application development tool and CMS for Ruby on Rails'
|
|
16
|
+
s.description = 'AgileRails, 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
17
|
s.license = 'MIT'
|
|
18
18
|
s.files = Dir['{app,config,db,lib}/**/*'] + %w[MIT-LICENSE Rakefile README.md CHANGELOG.md agile_rails.gemspec]
|
|
19
19
|
#s.test_files = Dir['test/**/*']
|
|
20
20
|
|
|
21
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/
|
|
22
|
+
s.metadata['source_code_uri'] = 'https://github.com/agile-rails/agile-rails'
|
|
23
|
+
s.metadata['changelog_uri'] = 'https://github.com/agile-rails/agile-rails/CHANGELOG.md'
|
|
24
24
|
|
|
25
25
|
s.required_ruby_version = '> 3.1'
|
|
26
26
|
|
|
@@ -348,6 +348,10 @@ process_json_result = function(json) {
|
|
|
348
348
|
case 'parenturl':
|
|
349
349
|
parent.location.href = value;
|
|
350
350
|
break;
|
|
351
|
+
case 'iframeurl':
|
|
352
|
+
let [iframe, url] = value.split(";");
|
|
353
|
+
document.getElementById(iframe).src = url
|
|
354
|
+
break;
|
|
351
355
|
case 'alert':
|
|
352
356
|
alert(value);
|
|
353
357
|
break;
|
|
@@ -532,6 +536,7 @@ function handleIframeFocus(){
|
|
|
532
536
|
|
|
533
537
|
var active_iframe = null;
|
|
534
538
|
*/
|
|
539
|
+
let timeoutId = null;
|
|
535
540
|
|
|
536
541
|
/*******************************************************************
|
|
537
542
|
* Events start here
|
|
@@ -1008,7 +1013,33 @@ $(document).ready( function() {
|
|
|
1008
1013
|
}
|
|
1009
1014
|
});
|
|
1010
1015
|
|
|
1011
|
-
/*******************************************************************
|
|
1016
|
+
/*******************************************************************
|
|
1017
|
+
* Help text is displayed as title when mouse hovered over label.
|
|
1018
|
+
* This was not wery obvious so, help icon was added to label
|
|
1019
|
+
* and help text is also displayed if user clicks on label text.
|
|
1020
|
+
*******************************************************************/
|
|
1021
|
+
$('.ar-form-label').on('click', function(e) {
|
|
1022
|
+
let titleText = $(this).attr('title');
|
|
1023
|
+
if (!titleText || titleText == ' ' ) return;
|
|
1024
|
+
|
|
1025
|
+
$('#popup')
|
|
1026
|
+
.text(titleText)
|
|
1027
|
+
.css({
|
|
1028
|
+
left: e.pageX + 10 + 'px',
|
|
1029
|
+
top: e.pageY + 10 + 'px',
|
|
1030
|
+
display: 'block'
|
|
1031
|
+
});
|
|
1032
|
+
$('#popup').addClass('tooltip');
|
|
1033
|
+
|
|
1034
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
1035
|
+
timeoutId = setTimeout(function () {
|
|
1036
|
+
$('#popup').css({display: 'none'});
|
|
1037
|
+
$('#popup').removeClass('tooltip');
|
|
1038
|
+
timeoutId = null;
|
|
1039
|
+
}, 3000);
|
|
1040
|
+
});
|
|
1041
|
+
|
|
1042
|
+
/*******************************************************************
|
|
1012
1043
|
* It is not possible to attach any data to submit button except the text
|
|
1013
1044
|
* that is written on a button and it is therefore very hard to distinguish
|
|
1014
1045
|
* which button was pressed when more than one button is present on a form.
|
|
@@ -791,6 +791,19 @@ display: inline-table;
|
|
|
791
791
|
margin-left: 4px;
|
|
792
792
|
}
|
|
793
793
|
|
|
794
|
+
.ar-form-label::after {
|
|
795
|
+
font-size: 0.9em;
|
|
796
|
+
content: '?';
|
|
797
|
+
color: #253858;
|
|
798
|
+
background-color: #E0EEFF;
|
|
799
|
+
border-radius: 10px;
|
|
800
|
+
padding: 0 6px;
|
|
801
|
+
border: 1px solid #E8EAEC;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.ar-form-label.no-help::after { display: none; }
|
|
805
|
+
|
|
806
|
+
|
|
794
807
|
.ar-form-label label {
|
|
795
808
|
padding: 0 4px;
|
|
796
809
|
font-size: 1em;
|
|
@@ -1698,6 +1711,14 @@ font-size: 1.2em;
|
|
|
1698
1711
|
cursor: pointer;
|
|
1699
1712
|
}
|
|
1700
1713
|
|
|
1714
|
+
#popup.tooltip {
|
|
1715
|
+
filter: none;
|
|
1716
|
+
position: fixed;
|
|
1717
|
+
border: 1px solid #666;
|
|
1718
|
+
background: lemonchiffon;
|
|
1719
|
+
z-index: 1000;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1701
1722
|
/************************** info popup *************************/
|
|
1702
1723
|
#ar-document-info {
|
|
1703
1724
|
position: absolute;
|
|
@@ -173,6 +173,7 @@ def new
|
|
|
173
173
|
# not authorized
|
|
174
174
|
unless agile_user_can(ArPermission::CAN_CREATE)
|
|
175
175
|
flash[:error] = t('agile.not_authorized')
|
|
176
|
+
logger.error("******* #{t('agile.not_authorized')} #{session[:user_name]} #{AgileHelper.table_param(params)}")
|
|
176
177
|
return index
|
|
177
178
|
end
|
|
178
179
|
create_new_empty_record()
|
|
@@ -34,6 +34,15 @@ def new_record
|
|
|
34
34
|
ArTemp.clear(temp_key) unless params[:clear].to_s == 'no'
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
######################################################################
|
|
38
|
+
# Return url for report iframe with additional parameters. Use when you need
|
|
39
|
+
# to send additional parameters to resulting iframe.
|
|
40
|
+
######################################################################
|
|
41
|
+
def report_url_for(params = {})
|
|
42
|
+
url = "if_ar_temp;/agile?field_name=ar_temp&iframe=if_ar_temp&table=ar_temp&form_name=#{@report_id}"
|
|
43
|
+
params.inject(url) { |r, v| "#{r}&#{v[0]}=#{v[1]}" }
|
|
44
|
+
end
|
|
45
|
+
|
|
37
46
|
######################################################################
|
|
38
47
|
# Will replace @form with @form['report'] if table=ar_temp.
|
|
39
48
|
# Will load agile_report_defaults if table=ar_memory and actions are not present.
|
|
@@ -38,7 +38,6 @@ def update_form
|
|
|
38
38
|
save_filter_value(filter, 'ar_setup', :filter)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
-
|
|
42
41
|
return unless params[:id]
|
|
43
42
|
|
|
44
43
|
record = if params[:id].to_i.to_s == params[:id]
|
|
@@ -48,11 +47,11 @@ def update_form
|
|
|
48
47
|
end
|
|
49
48
|
|
|
50
49
|
unless agile_user_has_role?('admin')
|
|
51
|
-
@form['form']
|
|
50
|
+
@form['form']['tabs'] = {}
|
|
52
51
|
@form['readonly'] = true unless record.editors.include?(session[:user_id])
|
|
53
52
|
end
|
|
54
53
|
|
|
55
|
-
form = YAML.load(record.form)
|
|
54
|
+
form = YAML.load(record.form)
|
|
56
55
|
if form.present?
|
|
57
56
|
@form['form']['tabs'] ||= {}
|
|
58
57
|
@form['form']['tabs'].merge!(form)
|