erp_app 3.1.1 → 3.1.2

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.
Files changed (35) hide show
  1. data/app/controllers/erp_app/desktop/scaffold/base_controller.rb +72 -72
  2. data/app/controllers/erp_app/desktop/security_management/capabilities_controller.rb +2 -1
  3. data/app/controllers/erp_app/desktop/security_management/groups_controller.rb +2 -0
  4. data/app/views/erp_app/desktop/base/index.erb +1 -0
  5. data/config/routes.rb +1 -1
  6. data/lib/active_ext/core.rb +88 -65
  7. data/lib/active_ext/data_structures/column.rb +17 -17
  8. data/lib/active_ext/data_structures/columns.rb +55 -52
  9. data/lib/active_ext/ext_helpers/table_builder.rb +58 -58
  10. data/lib/erp_app/engine.rb +1 -1
  11. data/lib/erp_app/extensions/railties/action_view/helpers/extjs_helper.rb +5 -2
  12. data/lib/erp_app/extensions/railties/action_view/helpers/include_helper.rb +4 -4
  13. data/lib/erp_app/version.rb +1 -1
  14. data/lib/erp_app/widgets/javascript_loader.rb +1 -1
  15. data/lib/erp_app/widgets/loader.rb +5 -6
  16. data/lib/generators/compass_ae_mobile/USAGE +9 -0
  17. data/lib/generators/compass_ae_mobile/compass_ae_mobile_generator.rb +35 -0
  18. data/lib/generators/compass_ae_mobile/templates/controllers/controller_template.erb +4 -0
  19. data/lib/generators/compass_ae_mobile/templates/javascripts/main_template.erb +29 -0
  20. data/lib/generators/compass_ae_mobile/templates/views/view_template.erb +25 -0
  21. data/public/javascripts/erp_app/desktop/applications/scaffold/models_tree_panel.js +11 -59
  22. data/public/javascripts/erp_app/desktop/applications/scaffold/module.js +37 -36
  23. data/public/javascripts/erp_app/shared/Ext.ux.CheckColumn.js +115 -0
  24. data/public/javascripts/erp_app/shared/compass_ckeditor.js +17 -0
  25. data/public/javascripts/erp_app/shared/compass_codemirror.js +171 -159
  26. data/public/javascripts/erp_app/shared/file_manager_tree.js +1 -1
  27. data/public/stylesheets/erp_app/shared/grid_cell.css +23 -0
  28. metadata +9 -9
  29. data/app/controllers/erp_app/desktop/scaffold/role_controller.rb +0 -23
  30. data/app/views/erp_app/desktop/scaffold/role/create.rhtml +0 -19
  31. data/app/views/erp_app/desktop/scaffold/role/edit.rhtml +0 -65
  32. data/app/views/erp_app/desktop/scaffold/role/new.rhtml +0 -41
  33. data/app/views/erp_app/desktop/scaffold/role/show.rhtml +0 -58
  34. data/app/views/erp_app/desktop/scaffold/role/update.rhtml +0 -1
  35. data/public/javascripts/erp_app/desktop/applications/scaffold/role_active_ext.js +0 -17
@@ -94,8 +94,13 @@ Ext.define("Compass.ErpApp.Shared.CKeditor",{
94
94
  },
95
95
 
96
96
  setupCkEditor : function(){
97
+ var me = this;
98
+
97
99
  Ext.applyIf(this.initialConfig.ckEditorConfig,{
98
100
  resize_enabled:false,
101
+ keystrokes:[
102
+ [CKEDITOR.CTRL + 83 /* S */, 'saveCommand']
103
+ ],
99
104
  base_path:'/javascripts/ckeditor/',
100
105
  toolbarStartupExpanded:true,
101
106
  enterMode:CKEDITOR.ENTER_BR,
@@ -104,6 +109,18 @@ Ext.define("Compass.ErpApp.Shared.CKeditor",{
104
109
  extraPlugins:'' // removed codemirror plugin as it is unstable
105
110
  });
106
111
  var editor = CKEDITOR.replace(this.inputEl.id, this.initialConfig.ckEditorConfig);
112
+
113
+ editor.addCommand('saveCommand', {
114
+ exec : function(editor, data) {
115
+ me.fireEvent('save', me, me.getValue());
116
+ //event handler
117
+ return function(e){
118
+ e = e || window.event;
119
+ e.e_stopPropagation();
120
+ }
121
+ }
122
+ });
123
+
107
124
  editor.extjsPanel = this;
108
125
  this.ckEditorInstance = editor;
109
126
  this.setValue(this.defaultValue);
@@ -3,179 +3,191 @@
3
3
  * @extends Ext.Panel
4
4
  * Converts a panel into a code mirror editor with toolbar
5
5
  * @constructor
6
- *
6
+ *
7
7
  * @author Dan Ungureanu - ungureanu.web@gmail.com / http://www.devweb.ro
8
8
  * @Enchnaced Russell Holmes
9
9
  */
10
10
 
11
11
  var CodeMirrorParsers = {
12
- parser: {
13
- sql: {
14
- path:'plsql',
15
- mode:'text/x-plsql'
16
- },
17
- rb:{
18
- path:'ruby',
19
- mode:'text/x-ruby'
20
- },
21
- rhtml:{
22
- path:'ruby',
23
- mode:'text/x-ruby'
12
+ parser:{
13
+ sql:{
14
+ path:'plsql',
15
+ mode:'text/x-plsql'
16
+ },
17
+ rb:{
18
+ path:'ruby',
19
+ mode:'text/x-ruby'
20
+ },
21
+ rhtml:{
22
+ path:'ruby',
23
+ mode:'text/x-ruby'
24
+ },
25
+ erb:{
26
+ path:'ruby',
27
+ mode:'text/x-ruby'
28
+ },
29
+ css:{
30
+ path:'css',
31
+ mode:'text/css'
32
+ },
33
+ js:{
34
+ path:'javascript',
35
+ mode:'text/javascript'
36
+ },
37
+ yml:{
38
+ path:'yaml',
39
+ mode:'text/x-yaml'
40
+ },
41
+ html:{
42
+ path:'htmlmixed',
43
+ mode:'text/html'
44
+ }
45
+ }
46
+ };
47
+
48
+ Ext.define("Compass.ErpApp.Shared.CodeMirror", {
49
+ extend:"Ext.panel.Panel",
50
+ alias:'widget.codemirror',
51
+ codeMirrorInstance:null,
52
+
53
+ initComponent:function () {
54
+ this.callParent(arguments);
55
+
56
+ this.addEvents(
57
+ /**
58
+ * @event save
59
+ * Fired when saving contents.
60
+ * @param {Compass.ErpApp.Shared.CodeMirror} codemirror This object
61
+ * @param (contents) contents needing to be saved
62
+ */
63
+ 'save'
64
+ );
24
65
  },
25
- erb:{
26
- path:'ruby',
27
- mode:'text/x-ruby'
66
+
67
+ constructor:function (config) {
68
+ var tbarItems = [];
69
+
70
+ if (!config['disableSave']) {
71
+ tbarItems.push({
72
+ text:'Save',
73
+ iconCls:'icon-save',
74
+ handler:this.save,
75
+ scope:this
76
+ });
77
+ }
78
+
79
+
80
+ tbarItems = tbarItems.concat([
81
+ {
82
+ text:'Undo',
83
+ iconCls:'icon-undo',
84
+ handler:function () {
85
+ this.codeMirrorInstance.undo();
86
+ },
87
+ scope:this
88
+ },
89
+ {
90
+ text:'Redo',
91
+ iconCls:'icon-redo',
92
+ handler:function () {
93
+ this.codeMirrorInstance.redo();
94
+ },
95
+ scope:this
96
+ }
97
+ ]);
98
+
99
+ if (!Compass.ErpApp.Utility.isBlank(config['tbarItems'])) {
100
+ tbarItems = tbarItems.concat(config['tbarItems']);
101
+ }
102
+
103
+ if (Compass.ErpApp.Utility.isBlank(config['disableToolbar']) || !config['disableToolbar']) {
104
+ config['tbar'] = tbarItems
105
+ }
106
+
107
+ config = Ext.applyIf({
108
+ layout:'fit',
109
+ autoScroll:true,
110
+ items:[
111
+ {
112
+ xtype:'textareafield',
113
+ readOnly:false,
114
+ hidden:true,
115
+ value:config['sourceCode']
116
+ }
117
+ ]
118
+ }, config);
119
+
120
+ this.callParent([config]);
28
121
  },
29
- css: {
30
- path:'css',
31
- mode:'text/css'
122
+
123
+ onRender:function (ct, position) {
124
+ this.callParent(arguments);
125
+ this.on('afterlayout', this.setupCodeMirror, this, {
126
+ single:true
127
+ });
32
128
  },
33
- js: {
34
- path:'javascript',
35
- mode:'text/javascript'
129
+
130
+ setupCodeMirror:function () {
131
+ var textAreaComp = this.query('textareafield')[0];
132
+ var self = this;
133
+ this.initialConfig.codeMirrorConfig = Ext.apply({
134
+ undoDepth:3,
135
+ lineNumbers:true,
136
+ extraKeys: {
137
+ "Ctrl-S": function(instance) { self.fireEvent('save', self, self.getValue()); },
138
+ "Cmd-S": function(instance) { self.fireEvent('save', self, self.getValue()); }
139
+ },
140
+ lineWrapping:true,
141
+ tabMode:"indent",
142
+ onChange:function () {
143
+ var code = self.codeMirrorInstance.getValue();
144
+ textAreaComp.setValue(code);
145
+ }
146
+ }, this.initialConfig.codeMirrorConfig);
147
+
148
+ //setup parser
149
+ var parserType = this.parser || 'html';
150
+ if (CodeMirrorParsers.parser[parserType]) {
151
+ var parserObj = CodeMirrorParsers.parser[parserType];
152
+ Compass.ErpApp.Utility.JsLoader.load('/javascripts/erp_app/codemirror/mode/' + parserObj.path + '/' + '' + parserObj.path + '.js', function () {
153
+ var editorConfig = Ext.applyIf(self.initialConfig.codeMirrorConfig, {
154
+ mode:parserObj.mode
155
+ });
156
+ self.codeMirrorInstance = CodeMirror.fromTextArea(Ext.getDom(textAreaComp.id), editorConfig);
157
+ self.setValue(textAreaComp.getValue());
158
+ self.codeMirrorInstance.setCursor(1);
159
+ });
160
+ }
161
+ else {
162
+ self.codeMirrorInstance = CodeMirror.fromTextArea(Ext.getDom(textAreaComp.id), self.initialConfig.codeMirrorConfig);
163
+ self.codeMirrorInstance.setValue(textAreaComp.getValue());
164
+ self.codeMirrorInstance.setCursor(1);
165
+ }
36
166
  },
37
- yml:{
38
- path:'yaml',
39
- mode:'text/x-yaml'
167
+
168
+ save:function () {
169
+ this.fireEvent('save', this, this.getValue());
40
170
  },
41
- html: {
42
- path:'htmlmixed',
43
- mode:'text/html'
44
- }
45
- }
46
- };
47
171
 
48
- Ext.define("Compass.ErpApp.Shared.CodeMirror",{
49
- extend:"Ext.panel.Panel",
50
- alias:'widget.codemirror',
51
- codeMirrorInstance : null,
52
-
53
- initComponent: function() {
54
- this.callParent(arguments);
55
-
56
- this.addEvents(
57
- /**
58
- * @event save
59
- * Fired when saving contents.
60
- * @param {Compass.ErpApp.Shared.CodeMirror} codemirror This object
61
- * @param (contents) contents needing to be saved
62
- */
63
- 'save'
64
- );
65
- },
66
-
67
- constructor : function(config){
68
- var tbarItems = [];
69
-
70
- if(!config['disableSave']){
71
- tbarItems.push({
72
- text: 'Save',
73
- iconCls:'icon-save',
74
- handler: this.save,
75
- scope: this
76
- });
77
- }
172
+ setValue:function (value) {
173
+ this.codeMirrorInstance.setValue(value);
174
+ },
78
175
 
176
+ getValue:function () {
177
+ return this.codeMirrorInstance.getValue();
178
+ },
79
179
 
80
- tbarItems = tbarItems.concat([{
81
- text: 'Undo',
82
- iconCls:'icon-undo',
83
- handler: function() {
84
- this.codeMirrorInstance.undo();
85
- },
86
- scope: this
87
- }, {
88
- text: 'Redo',
89
- iconCls:'icon-redo',
90
- handler: function() {
91
- this.codeMirrorInstance.redo();
92
- },
93
- scope: this
94
- }]);
95
-
96
- if(!Compass.ErpApp.Utility.isBlank(config['tbarItems'])){
97
- tbarItems = tbarItems.concat(config['tbarItems']);
98
- }
180
+ getCursor:function () {
181
+ return this.codeMirrorInstance.getCursor();
182
+ },
99
183
 
100
- if(Compass.ErpApp.Utility.isBlank(config['disableToolbar']) || !config['disableToolbar']){
101
- config['tbar'] = tbarItems
102
- }
184
+ getSelection:function () {
185
+ return this.codeMirrorInstance.getSelection();
186
+ },
103
187
 
104
- config = Ext.applyIf({
105
- layout:'fit',
106
- autoScroll:true,
107
- items: [{
108
- xtype: 'textareafield',
109
- readOnly: false,
110
- hidden: true,
111
- value: config['sourceCode']
112
- }]
113
- },config);
114
-
115
- this.callParent([config]);
116
- },
117
-
118
- onRender : function(ct, position){
119
- this.callParent(arguments);
120
- this.on('afterlayout', this.setupCodeMirror, this, {
121
- single: true
122
- });
123
- },
124
-
125
- setupCodeMirror : function(){
126
- var textAreaComp = this.query('textareafield')[0];
127
- var self = this;
128
- this.initialConfig.codeMirrorConfig = Ext.apply({
129
- undoDepth: 3,
130
- lineNumbers: true,
131
- lineWrapping: true,
132
- tabMode: "indent",
133
- onChange: function() {
134
- var code = self.codeMirrorInstance.getValue();
135
- textAreaComp.setValue(code);
136
- }
137
- },this.initialConfig.codeMirrorConfig);
138
-
139
- //setup parser
140
- var parserType = this.parser || 'html';
141
- if(CodeMirrorParsers.parser[parserType]){
142
- var parserObj = CodeMirrorParsers.parser[parserType];
143
- Compass.ErpApp.Utility.JsLoader.load('/javascripts/erp_app/codemirror/mode/'+parserObj.path+'/'+''+parserObj.path+'.js',function(){
144
- var editorConfig = Ext.applyIf(self.initialConfig.codeMirrorConfig, {
145
- mode:parserObj.mode
146
- });
147
- self.codeMirrorInstance = CodeMirror.fromTextArea(Ext.getDom(textAreaComp.id), editorConfig);
148
- self.setValue(textAreaComp.getValue());
149
- self.codeMirrorInstance.setCursor(1);
150
- });
151
- }
152
- else{
153
- self.codeMirrorInstance = CodeMirror.fromTextArea( Ext.getDom(textAreaComp.id), self.initialConfig.codeMirrorConfig);
154
- self.codeMirrorInstance.setValue(textAreaComp.getValue());
155
- self.codeMirrorInstance.setCursor(1);
188
+ insertContent:function (value) {
189
+ var lineNumber = this.codeMirrorInstance.getCursor().line;
190
+ var lineText = this.codeMirrorInstance.lineInfo(lineNumber).text;
191
+ this.codeMirrorInstance.setLine(lineNumber, (lineText + value));
156
192
  }
157
- },
158
-
159
- save : function(){
160
- this.fireEvent('save', this, this.getValue());
161
- },
162
-
163
- setValue : function(value){
164
- this.codeMirrorInstance.setValue(value);
165
- },
166
-
167
- getValue : function(){
168
- return this.codeMirrorInstance.getValue();
169
- },
170
- getCursor : function(){
171
- return this.codeMirrorInstance.getCursor();
172
- },
173
- getSelection : function() {
174
- return this.codeMirrorInstance.getSelection();
175
- },
176
- insertContent : function(value){
177
- var lineNumber = this.codeMirrorInstance.getCursor().line;
178
- var lineText = this.codeMirrorInstance.lineInfo(lineNumber).text;
179
- this.codeMirrorInstance.setLine(lineNumber,(lineText + value));
180
- }
181
193
  });
@@ -670,7 +670,7 @@ Ext.define("Compass.ErpApp.Shared.FileManagerTree",{
670
670
  autoDestroy:true,
671
671
  split:true,
672
672
  autoScroll:true,
673
- margins: '5 0 5 5',
673
+ //margins: '5 0 5 5',
674
674
  viewConfig: {
675
675
  loadMask: true,
676
676
  plugins: {
@@ -0,0 +1,23 @@
1
+ .x-grid-cell-checkcolumn .x-grid-cell-inner {
2
+ padding-top: 4px;
3
+ padding-bottom: 2px;
4
+ line-height: 14px;
5
+ }
6
+ .x-grid-with-row-lines .x-grid-cell-checkcolumn .x-grid-cell-inner {
7
+ padding-top: 3px;
8
+ }
9
+ .x-grid-checkheader {
10
+ height: 14px;
11
+ background-image: url('/images/unchecked.gif');
12
+ background-position: 50% -2px;
13
+ background-repeat: no-repeat;
14
+ background-color: transparent;
15
+ }
16
+
17
+ .x-grid-checkheader-checked {
18
+ background-image: url('/images/checked.gif');
19
+ }
20
+
21
+ .x-grid-checkheader-editor .x-form-cb-wrap {
22
+ text-align: center;
23
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-11 00:00:00.000000000 Z
12
+ date: 2013-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: will_paginate
@@ -1494,7 +1494,6 @@ files:
1494
1494
  - public/javascripts/erp_app/desktop/applications/file_manager/module.js
1495
1495
  - public/javascripts/erp_app/desktop/applications/scaffold/models_tree_panel.js
1496
1496
  - public/javascripts/erp_app/desktop/applications/scaffold/module.js
1497
- - public/javascripts/erp_app/desktop/applications/scaffold/role_active_ext.js
1498
1497
  - public/javascripts/erp_app/desktop/applications/security_management/capabilities_panel.js
1499
1498
  - public/javascripts/erp_app/desktop/applications/security_management/capabilities_widget.js
1500
1499
  - public/javascripts/erp_app/desktop/applications/security_management/groups_effective_security.js
@@ -1675,6 +1674,7 @@ files:
1675
1674
  - public/javascripts/erp_app/shared/dynamic_editable_grid.js
1676
1675
  - public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js
1677
1676
  - public/javascripts/erp_app/shared/dynamic_forms/dynamic_form_fields.js
1677
+ - public/javascripts/erp_app/shared/Ext.ux.CheckColumn.js
1678
1678
  - public/javascripts/erp_app/shared/file_manager_tree.js
1679
1679
  - public/javascripts/erp_app/shared/file_upload/Ext.ux.panel.UploadPanel.js
1680
1680
  - public/javascripts/erp_app/shared/file_upload/plupload.flash.swf
@@ -4784,6 +4784,7 @@ files:
4784
4784
  - public/stylesheets/erp_app/mobile/applications/user_management/main.css
4785
4785
  - public/stylesheets/erp_app/mobile/mobile.css
4786
4786
  - public/stylesheets/erp_app/shared/compass-ext-all.css
4787
+ - public/stylesheets/erp_app/shared/grid_cell.css
4787
4788
  - public/stylesheets/erp_app/shared/hover_finger.css
4788
4789
  - public/stylesheets/extjs/resources/css/ext-all-access-debug.css
4789
4790
  - public/stylesheets/extjs/resources/css/ext-all-access.css
@@ -6818,7 +6819,6 @@ files:
6818
6819
  - app/controllers/erp_app/desktop/control_panel/desktop_management_controller.rb
6819
6820
  - app/controllers/erp_app/desktop/file_manager/base_controller.rb
6820
6821
  - app/controllers/erp_app/desktop/scaffold/base_controller.rb
6821
- - app/controllers/erp_app/desktop/scaffold/role_controller.rb
6822
6822
  - app/controllers/erp_app/desktop/security_management/base_controller.rb
6823
6823
  - app/controllers/erp_app/desktop/security_management/capabilities_controller.rb
6824
6824
  - app/controllers/erp_app/desktop/security_management/groups_controller.rb
@@ -6866,11 +6866,6 @@ files:
6866
6866
  - app/models/widget.rb
6867
6867
  - app/observers/user_app_container_observer.rb
6868
6868
  - app/views/erp_app/desktop/base/index.erb
6869
- - app/views/erp_app/desktop/scaffold/role/create.rhtml
6870
- - app/views/erp_app/desktop/scaffold/role/edit.rhtml
6871
- - app/views/erp_app/desktop/scaffold/role/new.rhtml
6872
- - app/views/erp_app/desktop/scaffold/role/show.rhtml
6873
- - app/views/erp_app/desktop/scaffold/role/update.rhtml
6874
6869
  - app/views/erp_app/login/index.erb
6875
6870
  - app/views/erp_app/mobile/base/index.erb
6876
6871
  - app/views/erp_app/mobile/login/index.erb
@@ -6946,6 +6941,11 @@ files:
6946
6941
  - lib/generators/cms_widget/templates/javascript/base.js.erb
6947
6942
  - lib/generators/cms_widget/templates/views/index.html.erb
6948
6943
  - lib/generators/cms_widget/USAGE
6944
+ - lib/generators/compass_ae_mobile/compass_ae_mobile_generator.rb
6945
+ - lib/generators/compass_ae_mobile/templates/controllers/controller_template.erb
6946
+ - lib/generators/compass_ae_mobile/templates/javascripts/main_template.erb
6947
+ - lib/generators/compass_ae_mobile/templates/views/view_template.erb
6948
+ - lib/generators/compass_ae_mobile/USAGE
6949
6949
  - lib/generators/desktop_application/desktop_application_generator.rb
6950
6950
  - lib/generators/desktop_application/templates/controllers/controller_template.erb
6951
6951
  - lib/generators/desktop_application/templates/INSTALL
@@ -1,23 +0,0 @@
1
- module ErpApp
2
- module Desktop
3
- module Scaffold
4
- class RoleController < ErpApp::Desktop::Scaffold::BaseController
5
- active_ext SecurityRole do |options|
6
- options[:inline_edit] = true
7
- options[:use_ext_forms] = false
8
- options[:ignore_associations] = true
9
- options[:show_id] = true
10
- options[:show_timestamps] = true
11
- options[:only] = [
12
- {:description => {:required => true, :readonly => false}},
13
- {:internal_identifier => {:required => true, :readonly => false}},
14
- {:external_identifier => {:required => false, :readonly => false}}
15
- ]
16
- options
17
- end
18
- end
19
- end
20
- end
21
- end
22
-
23
-
@@ -1,19 +0,0 @@
1
- <!--
2
- ActiveExt Scaffold Create
3
- This page is needed to allow the Create action to complete. It also provides
4
- the post-create refresh and window close functions.
5
- -->
6
-
7
- <script type="text/javascript">
8
- function close_and_refresh(){
9
-
10
- parent.refresh_grid();
11
- parent.close_window("create_detail_window");
12
- }
13
- </script>
14
- <body onload="close_and_refresh() ;">
15
- <h1>Created <%= @singular_name.capitalize%></h1>
16
- <div align=RIGHT>
17
- <input type="button" value="Close" onclick=close_and_refresh() />
18
- </div>
19
- </body>
@@ -1,65 +0,0 @@
1
- <h1>Editing <%= @singular_name.capitalize %></h1>
2
- <% form_for @model, :url => { :action => 'update' } do |form| %>
3
- <div id='container'>
4
- <table>
5
- <% if @options[:show_id]==true %>
6
- <tr>
7
- <td style="text-align:right;">
8
- <b>Id:</b>
9
- </td>
10
- <td>
11
- <%=form.text_field :id, :disabled => true%>
12
- </td>
13
- </tr>
14
- <% end %>
15
- <% attribute_keys = @fields %>
16
- <% attribute_keys.length.times do |attribute_key_id|
17
- Rails.logger.debug("attribute_key_id:#{attribute_key_id}")
18
- %>
19
- <tr>
20
- <td style="text-align:right;">
21
- <b><% value=attribute_keys[attribute_key_id]
22
- Rails.logger.debug("@labels:#{@labels}")
23
- override_label_value= @labels[value.to_sym] unless @labels.nil?
24
- if(override_label_value!=nil)
25
- label_value=override_label_value
26
- else
27
- label_value= value.to_s.humanize
28
- end %>
29
- <%= label_value %>:</b>
30
- </td>
31
- <td>
32
- <% if(@disabled_fields.include?(attribute_keys[attribute_key_id]))
33
- disabled_flag=true
34
- else
35
- disabled_flag=false
36
- end unless @disabled_fields.nil?
37
- %>
38
- <%= form.text_field attribute_keys[attribute_key_id], :disabled => disabled_flag %>
39
- </td>
40
- </tr>
41
- <% end %>
42
- <% if @options[:show_timestamps]==true %>
43
- <tr>
44
- <td style="text-align:right;">
45
- <b>Created At:</b>
46
- </td>
47
- <td>
48
- <%= form.text_field :created_at, :disabled =>true %>
49
- </td>
50
- </tr>
51
- <tr>
52
- <td style="text-align:right;">
53
- <b>Updated At:</b>
54
- </td>
55
- <td>
56
- <%= form.text_field :updated_at, :disabled =>true %>
57
- </td>
58
- </tr>
59
- <% end %>
60
- </table>
61
- <div style="text-align:right;">
62
- <%=active_ext_close_button%> <input type="submit" value="Update"/>
63
- </div>
64
- </div>
65
- <% end %>
@@ -1,41 +0,0 @@
1
- <h1>New <%= @singular_name.capitalize %></h1>
2
- <%= @disabled_fields%>
3
- <% form_for @model , :html => { :id => 'create_form'}, :url => { :action => 'create' } do |form| %>
4
-
5
- <div id='container'>
6
- <table>
7
- <% attribute_keys= @fields %>
8
- <% attribute_keys.length.times do |attribute_key_id|
9
- Rails.logger.debug("attribute_key_id:#{attribute_key_id}")
10
- %>
11
- <tr>
12
- <td align=RIGHT>
13
- <b><% value=attribute_keys[attribute_key_id]
14
- Rails.logger.debug("@labels:#{@labels}")
15
- override_label_value= @labels[value.to_sym] unless @labels.nil?
16
- if(override_label_value!=nil)
17
- label_value=override_label_value
18
- else
19
- label_value= value.to_s.humanize
20
- end %>
21
- <%= label_value %>:</b>
22
- </td>
23
- <td>
24
- <% Rails.logger.debug("attributekey:#{attribute_keys[attribute_key_id]}")%>
25
- <%if(@disabled_fields.include?(attribute_keys[attribute_key_id]))
26
- disabled_flag=true
27
- else
28
- disabled_flag=false
29
- end unless @disabled_fields.nil?
30
- %>
31
- <%= form.text_field attribute_keys[attribute_key_id], :disabled => disabled_flag %>
32
- </td>
33
- </tr>
34
- <% end %>
35
- <% end %>
36
- </table>
37
- <div style="text-align:right;">
38
- <input type="submit" value="Add" />
39
- <%=active_ext_close_button%>
40
- </div>
41
- </div>