forked from shannah/xataface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.ini
691 lines (578 loc) · 19 KB
/
actions.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
;;------------------------------------------------------------------------------
;; Table tabs
;; -----------
;;
;; The table tabs are the little tabs ('details', 'list', 'find', ...) at the top
;; of the screen.
;; Show the details of the current record
[browse]
label = Details
category = table_tabs
url = "{$this->url('-action=view')}"
accessKey = "b"
mode = browse
permission = view
order=0
;; Show a list of the records in the current found set
[list]
label = List
category = table_tabs
url = "{$this->url('-action=list')}"
accessKey = "l"
mode = list
template = Dataface_List_View.html
permission = list
order=0.5
;; Show a "Find Record Form"
[find]
label = Find
category = table_tabs
url = "{$this->url('-action=find')}"
accessKey = "f"
mode = find
permission = find
template = Dataface_Find_View.html
order=0.75
[calendar]
label = Calendar
category = table_tabs
mode=calendar
permission=calendar
order=1
url="{$this->url('-action=calendar')}"
condition="false"
[search_index]
label="This Site"
category=find_actions
condition="isset($this->_conf['_index'])"
action=search_index
permission=find_multi_table
;;------------------------------------------------------------------------------
;; Table Actions
;; --------------
;; The table actions are the actions that appear in the "actions to be performed"
;; menu in the top right of the screen. (e.g. new, delete, etc..)
;; Create a new record
[new]
label = New Record
description = Create a new record
url = "{$this->url('-action=new', false)}"
icon = "{$dataface_url}/images/add_icon.gif"
category = table_actions
accessKey = n
mode = browse
permission = new
order=1
;; Post a record update using HTTP POST
[post]
permission = post
;; Show all records in the current table
[show_all]
label = Show All
description = Show all records in table
url = "{$site_href}?-action=list&-table={$table}"
icon = "{$dataface_url}/images/zoom-out.gif"
accessKey = a
category = table_actions
mode = list
permission = show all
order=4
[copy_replace]
label="Copy Set"
description="Copy the records in this found set."
url="{$this->url('-action=copy_replace')}&--copy=1"
accessKey = c
mode = copy_replace
order=5
icon="{$dataface_url}/images/view.gif"
[copy_replace_ui]
label="Copy Set"
description="Copy the records in this found set."
url="{$this->url('-action=copy_replace')}&--copy=1"
accessKey = c
mode = copy_replace
order=5
icon="{$dataface_url}/images/view.gif"
category=table_actions
permission=copy
[update_set]
label="Update Set"
description="Update the records in this found set as a group."
url="{$this->url('-action=copy_replace')}&--copy=0"
accessKey=u
mode = copy_replace
permission = update_set
order=6
icon="{$dataface_url}/images/edit.gif"
category=table_actions
[export_csv]
label = Export CSV
description = "Export the current result set in comma separated value (CSV) format. CSV is compatible with most spread sheet applications like MS Excel"
url = "{$this->url('-action=export_csv')}"
icon = "{$dataface_url}/images/table.gif"
mode=list
permission=export_csv
category=result_list_actions
[export_xml]
label = Export XML
description = "Export the current result set as XML."
url = "{$this->url('-action=export_xml')}"
permission=export_xml
mode=list
category=result_list_actions
icon="{$dataface_url}/images/xml.png"
[export_json]
label = Export JSON
description = "Export the current result set as JSON."
url = "{$this->url('-action=export_json')}"
permission=export_json
[view_xml]
label = Export XML
description = "Export an XML representation of this record"
url = "{$record->getURL('-action=export_xml')}&--single-record-only=1"
url_condition="$record"
permission=view xml
mode=browse
category=record_actions
icon="{$dataface_url}/images/xml.png"
condition="$record"
[rss]
label=RSS
description=RSS Feed of this found set.
url="{$this->url('-action=feed&-mode=list')}&--format=RSS2.0"
icon="{$dataface_url}/images/feed-icon-14x14.png"
permission=rss
category=result_list_actions
[record_rss > rss]
category=record_actions
url="{$record->getURL('-action=single_record_search')}&--format=RSS2.0"
condition="$record"
url_condition="$record"
description="Subscribe to receive RSS updates when this record is updated"
[related_rss]
label=RSS
description="Subscribe to RSS feed of this relationship"
url="{$this->url('-action=feed&-mode=list')}&--format=RSS2.0"
icon="{$dataface_url}/images/feed-icon-14x14.png"
permission=rss
category=related_list_actions
[related_xml > export_xml]
category=related_list_actions
[feed]
mode=list
permission=rss
[export_csv_related]
label = Export CSV
description = "Export the current result set in comma separated value (CSV) format. CSV is compatible with most spread sheet applications like MS Excel"
url = "{$this->url('-action=export_csv')}&--related=1"
icon = "{$dataface_url}/images/table.gif"
mode=list
permission=export_csv
category=related_list_actions
;; Delete the current record
[delete]
label = Delete
description = Delete current record
url = "{$this->url('-action=delete&-delete-one=1')}"
icon = "{$dataface_url}/images/recycle.gif"
category = table_actions
accessKey = d
mode = browse
condition = "$query['-mode']=='browse'"
permission = delete
order=5
;; Delete all records in the current found set
[delete_found]
label = Delete Set
description = Delete found records
url = "{$this->url('-action=delete&-delete-found=1')}"
icon = "{$dataface_url}/images/recycle.gif"
category = table_actions
mode = list
condition = "$query['-mode']=='list'"
permission = delete found
order=5
[delete_selected]
label="Delete"
description="Delete selected records"
permission = delete selected
category=selected_result_actions
confirm="Are you sure you want to delete the selected records?"
icon="{$dataface_url}/images/delete.gif"
;; Invalidates the current translations and marks a new version
[invalidate_translations]
label = "Invalidate Translations"
description = "Flag all translations of this record (or the currently found records) so that they will be re-translated."
url = "javascript:invalidateTranslations('{$this->url('-action=invalidate_translations')}&--redirect='+escape('{$this->url()}'));"
icon = "{$dataface_url}/images/broken.gif"
category = record_actions
permission = edit
condition = "$query['-mode'] == 'browse' and $this->_conf['multilingual_content']"
;; Used in the summary list to edit the current record
[summary_edit]
label="Edit"
description="Edit this record"
url="{$record->getURL('-action=edit')}"
url_condition="is_a($record,'Dataface_Record')"
icon="{$dataface_url}/images/edit.gif"
permission=edit
category=summary_actions
condition="$record"
[set_translation_status]
label = "Set Translation Status"
description = "Set the translation status of the found set."
url="{$this->url('-action=set_translation_status')}"
category=table_actions
condition="$this->_conf['multilingual_content']"
permission=edit
icon="{$dataface_url}/images/workflow.gif"
order=10
[submit_translation]
label = "Submit a translation"
description = "Submit your own translation for this section"
url = "javascript:window.location='{$this->url('-action=submit_translation')}&--url='+escape(window.location.href)+'&--recordid='+escape('{$context[record_id]}')"
category=translation_warning_actions
[view_original]
label = "View original"
description = "View the original version of this page in its original language"
url = "{$this->url(array('-lang'=>$this->_conf['default_language']))}"
category = translation_warning_actions
;;------------------------------------------------------------------------------
;; Record Tabs
;; -----------
;; The record tabs are the tabs that always appear at the top of the record
;; detail view. In 0.5.3 this would consist of a "main" tab and tabs for
;; all of the relationships of that table.
;; As of 0.6, there is a 'View' tab (read only) AND and 'Edit' tab for editing,
;; in addition to the relationships.
;; View the details of the current record.
[view]
label = View
url = "{$this->url('-action=view&-relationship=')}"
template = Dataface_View_Record.html
permission = view
mode = browse
category = record_tabs
selected_condition = "$query['-action'] == 'view'"
order=-2
;; Edit the details of the current record.
[edit]
label = Edit
url = "{$this->url('-action=edit&-relationship=')}"
template = Dataface_Edit_Record.html
mode = browse
category = record_tabs
selected_condition = "$query['-action'] == 'edit'"
permission = edit
order=-1
;; Translate a record
[translate]
label = Translate
url = "{$this->url('-action=translate&-relationship=')}"
template = Dataface_Translate_Record.html
mode = browse
category = record_tabs
selected_condition = "$query['-action'] == 'translate'"
condition = "($tableobj =& Dataface_Table::loadTable($table)) and count($tableobj->getTranslations()) > 0"
permission = translate
order=3
;; History for a record
[history]
url = "{$this->url('-action=history')}"
template = Dataface_Record_History.html
mode = browse
category = record_tabs
selected_condition = "$query['-action'] == 'history'"
condition = "is_array($this->_conf['history'])"
permission = history
order=4
[view_history_record_details]
mode = browse
permission = history
[single_record_search]
permission=view
;;------------------------------------------------------------------------------
;; Other actions that don't appear as a button in any particular place on the
;; screen but, nonetheless, need to be defined
;; Show of a list of the records in a specified relationship
[related_records_list]
mode = browse
template = Dataface_Related_Records_List.html
label = "{$query['-relationship']}"
permission = view
related=1
allow_override="relationships.ini"
;;------------------------------------------------------------------------------
;; Relationship Actions
;; --------------------
;; Actions that appear above related record lists. E.g., "Add New Related Record"
;; Show the "Add Related Record" form to add a record to a relationship
[new_related_record]
mode = browse
template = Dataface_Add_New_Related_Record.html
permission = add new related record
category = relationship_actions
label = "Add new {$query['-relationship']} record"
related=1
;; Show the "Add Existing Related Record" form to add an existing record to a
;; relationship.
[existing_related_record]
mode = browse
template = Dataface_Add_Existing_Related_Record.html
permission = add existing related record
category = relationship_actions
related=1
;; Remove record from a relationship
[remove_related_record]
mode = browse
template = Dataface_Remove_Related_Record.html
permission = remove related record
category=selected_records_actions
label = remove
related=1
[reorder_related_records]
permission = reorder_related_records
mode = browse
related=1
;;------------------------------------------------------------------------------
[login]
[logout]
;; Action to register new users to the application
;; This action is only enabled if allow_register=1 in the [_auth] section of
;; the conf.ini file.
[register]
;; This should appear in beneath the login form
category = login_actions
mode = browse
label = Register for an account
url = "{$this->url('-action=register')}"
;; Only show this action is registration is allowed in the conf.ini
;; file.
condition = "$this->_conf['_auth']['allow_register']"
;; By default we use email validation. i.e accounts are not created until
;; they have been verified by email. @see activate
email_validation=1
[forgot_password]
;; This should appear in beneath the login form
category = login_actions
mode = browse
label = Forgot password
url="{$this->url('-action=forgot_password')}"
;; An action to activate an account after it has been verified by email.
;; This is part 2 of the registration process if email_validation is
;; enabled in the register action.
[activate]
mode=browse
;; The number of seconds the user has between filling in the registration
;; form and activating the account. Default 3600 seconds = 1 hour.
time_limit=3600
[import]
label = Import Records
mode = import
description = "Import records into table"
url = "{$this->url('-action=import')}"
category=table_actions
icon="{$dataface_url}/images/worklist.gif"
permission=import
order = 20
;;------------------------------------------------------------------------------
;; AJAX Actions
[ajax_save]
category = ajax_actions
;;permission = ajax_save
mode=browse
[ajax_related_find_form]
permission=find
[ajax_load]
category = ajax_actions
permission = ajax_load
mode=browse
[ajax_form]
category = ajax_actions
;;permission = ajax_form ;; We let the action handle its own permissions
;;------------------------------------------------------------------------------
;; Find actions
[find_list]
permission=find_list
label = "{$query['-table']}"
description = "Find records in {$query['-table']} category only."
order = 10
category=find_actions
action="{$app->getSearchTarget()}"
;;[find_multi_table]
;;permission=find_multi_table
;;label = "All categories"
;;order = 11
;;category=find_actions
;;------------------------------------------------------------------------------
;; Selected records actions. These are the actions that can be performed on
;; records that are "checked" in list view.
;[copy_selected]
;category=selected_records_actions
;order=1
;[cut_selected]
;category=selected_records_actions
;order=2
;[paste_selected]
;category=selected_records_actions
;order=3
;[remove_selected]
;category=selected_records_actions
;order=4
;;----------------------------------------------------------------------------
;; Actions available to a history record - displayed in list view.
[history_restore_record]
category=history_record_actions
label = "Restore"
url = "javascript: historyToolClient.restoreRecord('{$context[history__id]}')"
onmouseover = "window.status = 'hello';"
description = "Restore the current record to the contents of this history snapshot"
permission = edit_history
icon="{$dataface_url}/images/undo_icon.gif"
[ajax_nav_tree_node]
permission = view
[ajax_view_record_details]
permission view
;;------------------------------------------------------------------------------
;; Grid actions
[load_grid]
permission = view
[update_grid]
permission = edit
;;------------------------------------------------------------------------------
;; Personal Tools
[my_profile]
condition="(df_is_logged_in())"
url="{$app->url('-action=my_profile')}"
label="My Profile"
category=personal_tools
[change_password]
condition="(df_is_logged_in())"
url="{$app->url('-action=change_password')}"
label="Change Password"
category=personal_tools
;;------------------------------------------------------------------------------
;; Management actions
[install]
permission=install
[manage]
permission=manage
category=personal_tools
label="Control Panel"
url="{$app->url('-action=manage')}"
template=manage.html
[manage_migrate]
permission=manage_migrate
category=management_actions
url="{$app->url('-action=manage_migrate')}"
label="Migrations"
description="A tool to help migrate to newer versions of Dataface."
[clear_views]
permission=clear views
category=management_actions
url="{$app->url('-action=clear_views')}"
label="Clear __sql__ Views"
description="Clears all of the cached views of the form dataface_view__xxx in the database. This is necessary if you have added or removed columns from tables that also specify a custom __sql__ directive in the fields.ini file."
[manage_output_cache]
permission=manage_output_cache
category=management_actions
url="{$app->url('-action=manage_output_cache')}"
label="Output cache"
description="Management options for the Dataface output cache."
condition="$app->_conf['_output_cache'] and $app->_conf['_output_cache']['enabled']"
[manage_build_index]
permission=manage_build_index
category=management_actions
url="{$app->url('-action=manage_build_index')}"
label="Build Search Index"
description="Build and maintain a search index to perform full site searches."
[copy_selected]
url="javascript:copySelected('result_list')"
label="Copy"
description="Copy selected records"
category=selected_result_actions
permission=copy
icon="{$dataface_url}/images/view.gif"
[update_selected]
url="javascript:updateSelected('result_list')"
label="Update"
description="Update selected records"
category=selected_result_actions
permission=update_selected
icon="{$dataface_url}/images/edit.gif"
[update_selected_related]
url="javascript:updateSelected('relatedList')"
label="Update"
description="Update selected records"
category=selected_related_result_actions
permission=update related records
condition="$record and $record->checkPermission('edit', array('relationship'=>$query['-relationship']))"
[remove_selected_related]
url="javascript:removeSelectedRelated('relatedList')"
label="Remove"
description="Remove selected records from this relationship"
category=selected_related_result_actions
permission=remove related record
condition="$record and $record->checkPermission('remove related record', array('relationship'=>$query['-relationship']))"
[xml_list]
permission = xml_view
[login_prompt]
template=Dataface_Login_Prompt.html
[view_event_details]
category=event_actions
condition="$record"
label="View Event Details"
permission=view
url="{$record->getURL('-action=view')}"
icon="{$dataface_url}/images/view.gif"
[edit_event_details]
category=event_actions
condition="$record"
label="Edit Event Details"
permission=edit
url="{$record->getURL('-action=edit')}"
icon="{$dataface_url}/images/edit.gif"
[RecordBrowser_data]
permission=view
[entry_page]
[open_record_in_table]
category=view_related_record_footer_actions
label="Open this record in the {$record->_table->getLabel()} table"
class="open-record-in-table"
permission=view
condition="$record"
url="{$record->getURL('-action=view')}"
url_condition="$record"
[edit_related_record]
category=view_related_record_actions
label="Edit {$record->getTitle()}"
label_condition="$record"
url="#"
class="edit-btn"
condition="$record"
permission="edit"
[cancel_edit_related_record]
category=edit_related_record_actions
label="Cancel"
url="#"
class="cancel-btn"
permission=edit
[show_hide_list_columns]
class="show-hide-columns-action"
category="result_list_actions"
url="{$this->url('-action=show_hide_columns')}&--visibility-types=list"
label="Show/Hide Columns"
permission="show hide columns"
condition="@$this->_conf['user_config_enabled']"
icon="{$dataface_url}/images/insert_columns.png"
description="Show or Hide columns from this list"
[show_hide_related_list_columns]
class="show-hide-related-list-columns-action"
category=related_list_actions
url="{$this->url('-action=show_hide_columns')}&--hide-local-fields=1&--relationships={$relationship->getName()}&--visibility-types=list"
url_condition="$relationship"
label="Show/Hide Columns"
permission="show hide columns"
condition="@$this->_conf['user_config_enabled']"
icon="{$dataface_url}/images/insert_columns.png"
description="Show or Hide columns from this list"