Development

sfExtjsThemePlugin: generator.yml

You must first sign up to be able to contribute.

sfExtjsThemePlugin: generator.yml

File generator.yml, 11.5 kB (added by Leon.van.der.Ree, 3 months ago)

Documentated generator.yml file

Line 
1 generator:
2   class:              sfExtjsPropelAdminGenerator
3   param:
4     model_class:      sfJob
5     theme:            extjs
6    
7     # This is used to get to the related editors
8     related_tables:
9       # A related table
10       sf_job_queue:
11         # The module with the tables editor
12         module_name: sfExtjsJobQueue
13        
14     fields:
15       sf_job_queue_id/name:
16         name: Queue
17         params:
18           # Defines if the field is editable in the grid. Overwrites list_editable from app.yml
19           editable: true
20           # The renderer code returns the rendered value. The code is executed in a function(value, id, record) where:
21           # - value is the field content
22           # - id is the record id
23           # - record is an array containing all the fields (e.g. record['sf_job_queue-scheduler_name'] returns the value
24           #   of the next field in this list.
25           # Therefore you can hide fields with list.hide or list.field.params.xtype: hidden and use them in renderers of other fields.
26           renderer: "return value;"
27       sf_job_queue_id/scheduler_name:
28         name: Scheduler
29         params:
30           editable: false
31           renderer: "return value;"
32       sf_job_queue_id/status:
33         name: Status
34         params:
35           editable: false
36           renderer: "return value;"
37       sf_job_queue_id/requested_status:
38         name: Requested Status
39         params:
40           editable: false
41           renderer: "return value;"
42       name:
43         name: Job name
44         params:
45           editable: true
46           # The renderLink function used here is the default function to render
47           # edit links. By default the returned link tries to use the addTab function
48           # to open a new tab with the edit dialog.
49           # To overwrite this behaivour with your own open dialog function, look at
50           #
51           renderer: "return renderLink(value, id, record);"
52       type:
53         name: Type
54         params:
55           editable: true
56       tries:
57         name: Tries
58         params:
59           editable: false
60       max_tries:
61         name: Max tries
62         help: Maximum tries of execution
63         params:
64           editable: true
65       is_recurring:
66         name: Recurring
67         params:
68           editable: true
69           renderer: "return ((value == true) ? 'Yes' : 'No');"
70       retry_delay:
71          name: Retry Del.
72          params:
73            editable: true
74       params:
75         name: Parameters
76       message:
77         name: Message
78       priority:
79         name: Priority
80         params:
81           editable: true
82       created_at:
83         name: Created
84       scheduled_at:
85         name: Scheduled
86       completed_at:
87         name: Completed
88       last_tried_at:
89         name: Last try
90       status:
91         name: Exit Status
92        
93     # In this section the grid view is configured. This includes grouping and actions.
94     list:
95       # Title of the Grid. Displayed on the border panel if available.
96       title: Job Overview
97      
98       # If true, selecting multiple items is turned OFF.
99       single_select: false
100       # The id of a column in this grid that should expand to fill unused space
101       auto_expand_column: params
102
103       # Array of fields to be displayed in hidden rows.
104       hide: []
105       # Array of fields to be displayed in the grid rows.
106       display: [ =name, type, tries, max_tries, is_recurring, retry_delay, params, priority, created_at, scheduled_at, last_tried_at, status]
107      
108       # Grouping options.
109       grouping:
110         # Make groups out of this fields value.
111         field: sf_job_queue_id/name
112         # Array of fields displayed in the group header. See list.fields below for formating options.
113         display: [sf_job_queue_id/name, sf_job_queue_id/scheduler_name, sf_job_queue_id/status, sf_job_queue_id/requested_status ]
114         # Groups are collapsable when true. No option to collapse groups when false.
115         collapsable: true
116         # An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality.
117         plugins: []
118        
119       # Fields to put filters on. The filters are shown in a tab if list_tabbed is true filter_add_handler emptied in app.yml
120       # if filter_add_hander is defined as a function(component) then the filter panel is passed to this function. (which can display it somewhere else)
121       filters: [ name, type, priority, created_at, scheduled_at, last_tried_at, status]
122      
123       # Peer method for pager defaults to doSelectJoinAll
124       # peer_method: doLeftJoinJobQueue
125       # Peer method for pager count.
126       # peer_count_method:
127      
128       # Settings for field behaivour in list view.
129       fields:
130         sf_job_queue_id/name:
131           # Gives the credentials for the field view.
132           # credentials:
133           # Name definition also possible here
134           # name:
135           # Disable the filter for this field. Doesn't work.
136           filter_criteria_disabled: false
137           # Joins this field value out of two fields.
138           # join_fields
139           params:
140             # Give the field a custom ID.
141             # id:
142             # Give the field a custom width.
143             # width:
144             # Prefix to write before the value. Plain HTML.
145             header_valuePrefix: "<b>Queue: "
146             # Prefix to write after the value. Plain HTML
147             header_valueSuffix: "</b> "
148         sf_job_queue_id/scheduler_name:
149           params:
150             header_valuePrefix: "(<small>Scheduler: "
151             header_valueSuffix:
152         sf_job_queue_id/status:
153           params:
154             header_valuePrefix: ", Status: "
155             header_valueSuffix:
156         sf_job_queue_id/requested_status:
157           params:
158             header_valuePrefix: ", Requested Status: "
159             header_valueSuffix: "</small>)"
160         # now imagine, we have a field "message" which we want to show with tinyMCE in the
161         # EDITOR: This code would stand here: (and remember that you have to set use_tinymce true in app.yml)
162         # message:
163           # params:
164             # plugins: [mceEditor]
165             #   height:
166             #   width:
167             #   xtype:
168             # What's the value here?
169             #   tinymceSettings:
170      
171       # List parameters
172       params:
173         # Default sortable of columns which have no sortable specified (defaults to false)
174         default_sortable: true
175      
176       # The click handler can be used to overwrite the default link given by renderLink renderer.
177       # To do so, give grid_open_link (in app.yml) a function(target) and execute the click handler.
178       # Execute click handlers.
179       object_click: true
180       # Execute double click handler
181       object_dblclick: true
182       # Turn on the context menu.
183      
184       object_contextmenu:
185         # The first menu item
186         restartJob:
187           # Menu item name.
188           name: Restart Job
189           # You can define your own icon for the menu action.
190           # icon: /path/to/icon
191           # Handler function. Called when menu item is clicked.
192           handler: "sfExtjsApp.runAction('sfExtjsJob/restart', 'Restart Job');"
193         restartQueue:
194           name: Restart Queue
195           handler: "sfExtjsApp.runAction('sfExtjsJob/restart', 'Restart Job');"
196         # This are the predefined menu items for the context menu.
197         # _edit:
198         #   # Edit has a custom name.
199         #   name: Edit this job
200         # Delete is not implemented yet.
201         # _delete: -
202      
203      
204       # All the actions in the list toolbar. Actions with an _ are predefined.
205       # The actions use grid_open_link to open if it is defined in app.yml
206       actions:
207         # Predefined create action.
208         _create:
209           # Custom name for create dialog
210           name: Add new Job
211         # Predefined delete action with no special settings.
212         _delete: -
213         # Predefined separator (vert. line).
214         _separator: -
215         # A custom action
216         create_Queue:
217           name: Add a new Queue
218           # Credentials don't work here yet.
219           # credentials: admin
220           # handler_function: "alert('Handler pressed');"
221           # If list_action_handler is defined as a function(url, action_name, action_title)
222           # then you can specify the url parameter throught this handler_url directive:
223           # (the other params are filled throught the configuration: action_name = create_Queue,
224           # action_title = "Add a new Queue" in this case) 
225           handler_url: "sfExtjsJobQueue/create"
226           # The button class: could be btn_create, btn_delete, btn_print, btn_refresh
227           class: btn_create
228         # Predefined refresh button / action.
229         _refresh: -
230         # Fills out all unused space in the toolbar.
231         _fill: -
232         # Opens a html table view which is printable.
233         _print: -
234         # Hooks to copy and edit a pdf-generator partial.
235         _pdf: -
236        
237     # In this section the edit dialog is configured.
238     edit:
239       # Title of the Edit window
240       title: Edit Job %%name%%
241       # Title of the create window
242       newtitle: Add new Job
243      
244       # Array of lists to display
245       display: [ sf_job_queue_id/name, =name, type ]
246       # Pages are sections of the edit window shown in tabs.
247       pages:
248         # A page.
249         run_configuration:
250           # Tab name.
251           title: Run Configuration
252           # Array of fields on tab.
253           display: [ max_tries, is_recurring, retry_delay, priority ]
254         parameters:
255           title: Job Parameters
256           display: [ params ]
257         creation_date:
258           title: Just to mess with dates
259           display: [created_at]
260      
261       # Actions, only for non-ajax mode.
262       # actions:
263       #   _save: -
264       #   _cancel: -
265        
266       # Fields in edit pages
267       fields:
268         # First Field. In this case defined as date in schema.yml
269         created_at:
270           # Tooltip on edit form.
271           help: Override job creation date.
272           # somehow this date field is broken and does not load it's value.
273           params:
274             # The default date format string which can be overriden for localization support. The format must be valid according to Date.parseDate (defaults to 'm/d/y').
275             date_format: d.m.y
276             # The minimum allowed date. Can be either a Javascript date object or a string date in a valid format (defaults to null).
277             # date_min_value: 01/01/2008
278             # An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
279             # Currently broken: date_disabled_days: [ 0, 1 ]
280             # The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
281             # date_disabled_days_text: You can't create Jobs on saturdays and sundays.
282         sf_job_queue_id/name:
283           # This is buggy on foreign fields. ToolTip from field "name" is taken.
284           help: Select a queue for your job.
285         name:
286           help: Select a name for your job.
287           params:
288             required: true
289         type:
290           name: Job Type
291           help: Define a job type
292         # fieldname:
293         #   name: Name Shown
294         #   class: hidden
295         # Upload Field
296         # upload:
297         #   name: Upload file
298         #   Only for non-ajax:
299         #   upload_dir:
300         #