infopark_fiona7 1.1.0.0.10 → 1.2.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/fiona7_ui.js +96 -50
- data/app/assets/javascripts/scrivito_patches/models/blob.js +21 -0
- data/app/assets/javascripts/scrivito_patches/models/obj.js +1 -1
- data/app/controllers/fiona7/release_controller.rb +6 -2
- data/app/controllers/fiona7/sessions_controller.rb +3 -0
- data/app/controllers/fiona7/workflow_controller.rb +46 -0
- data/app/helpers/fiona7_login_helper.rb +16 -0
- data/app/helpers/fiona7_override_helper.rb +1 -1
- data/config/delayed_routes.rb +1 -0
- data/config/precedence_routes.rb +92 -0
- data/infopark_fiona7.gemspec +2 -2
- data/lib/fiona7/blob_id_generator.rb +13 -0
- data/lib/fiona7/builder/indirect_blob_builder.rb +71 -0
- data/lib/fiona7/builder/lazy_blob_copier.rb +207 -0
- data/lib/fiona7/builder/obj_builder.rb +29 -50
- data/lib/fiona7/builder/obj_class_builder.rb +20 -0
- data/lib/fiona7/controllers/rest_api/blob_controller.rb +19 -0
- data/lib/fiona7/controllers/rest_api/obj_controller.rb +8 -4
- data/lib/fiona7/controllers/rest_api/workspace_controller.rb +2 -1
- data/lib/fiona7/engine.rb +56 -2
- data/lib/fiona7/json/obj_decorator.rb +4 -1
- data/lib/fiona7/link_converter/fiona_to_scrivito.rb +3 -1
- data/lib/fiona7/link_converter/scrivito_to_fiona.rb +12 -1
- data/lib/fiona7/mode_switch/cms_routes/scrivito_sdk.rb +1 -71
- data/lib/fiona7/mode_switch/cms_routes/scrivito_sdk_slave.rb +1 -71
- data/lib/fiona7/recursive_object_finder.rb +32 -8
- data/lib/fiona7/routers/rest_api.rb +6 -7
- data/lib/fiona7/scrivito_patches/attribute_content.rb +1 -1
- data/lib/fiona7/scrivito_patches/attribute_serializer.rb +22 -1
- data/lib/fiona7/scrivito_patches/basic_obj.rb +27 -5
- data/lib/fiona7/scrivito_patches/cms_backend.rb +3 -22
- data/lib/fiona7/scrivito_patches/cms_rest_api.rb +2 -1
- data/lib/fiona7/scrivito_patches/cms_routing.rb +2 -2
- data/lib/fiona7/scrivito_patches/model_library.rb +3 -3
- data/lib/fiona7/scrivito_patches/page_config.rb +21 -1
- data/lib/fiona7/scrivito_patches/preset_routes.rb +15 -2
- data/lib/fiona7/scrivito_patches/routing_extensions.rb +33 -20
- data/lib/fiona7/scrivito_patches/workspace.rb +3 -1
- data/lib/fiona7/super_object_finder.rb +63 -0
- data/lib/fiona7/type_register.rb +35 -9
- data/lib/fiona7/verity_search_engine.rb +1 -1
- data/lib/fiona7/version.rb +1 -1
- metadata +13 -7
- data/config/routes.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5390d8274e0e6c0929da925705786a07b297d912
|
4
|
+
data.tar.gz: 13969d1b7aa62d32be9679bd08b576bae5cb471a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a752b07549ac28002aede720ea199a2d299898e5d6e325365dabee926cca3a58d5a67f2352fcfc367fe19876b154bc9b4ed0add07c2b5e372300a3d8aa1f02b9
|
7
|
+
data.tar.gz: 6aa69f7e831a3d9fdc9fecb5028bbfbf3b935a29655895f5fa24aed5d8a67b70fed900bdbf2e40246a0ec33f96de671c7034921cd2f6ec03ae09471a56c3f67b
|
@@ -104,6 +104,13 @@
|
|
104
104
|
'commands.release_obj.dialog.confirm': 'Freigeben',
|
105
105
|
'commands.release_obj.failed': 'Freigabe fehlgeschlagen',
|
106
106
|
|
107
|
+
'commands.edit_obj.title': 'Seite bearbeiten',
|
108
|
+
'commands.edit_obj.dialog.title': 'Seite bearbeiten?',
|
109
|
+
'commands.edit_obj.dialog.description': 'Es wird eine neue Arbeitsversion erstellt.',
|
110
|
+
'commands.edit_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
111
|
+
'commands.edit_obj.dialog.confirm': 'Bearbeiten',
|
112
|
+
'commands.edit_obj.failed': 'Bearbeitung fehlgeschlagen',
|
113
|
+
|
107
114
|
'commands.forward_obj.title': 'Seite weiterleiten',
|
108
115
|
'commands.forward_obj.dialog.title': 'Seite weiterleiten?',
|
109
116
|
'commands.forward_obj.dialog.description': 'Die Arbeitsversion wird an einen weiteren Bearbeiter weitergeleitet. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
@@ -137,7 +144,10 @@
|
|
137
144
|
'commands.take_obj.dialog.description': 'Die Arbeitsversion wird übernommen. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
138
145
|
'commands.take_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
139
146
|
'commands.take_obj.dialog.confirm': 'Übernehmen',
|
140
|
-
'commands.take_obj.failed': 'Übernahme fehlgeschlagen'
|
147
|
+
'commands.take_obj.failed': 'Übernahme fehlgeschlagen',
|
148
|
+
|
149
|
+
'editing_disabled.workflow': 'Die Datei unterliegt einem Workflow und kann nicht direkt bearbeitet werden.',
|
150
|
+
'editing_disabled.permissions': 'Ihnen fehlen die Rechte um die Datei zu bearbeiten'
|
141
151
|
}, 'de');
|
142
152
|
|
143
153
|
$.i18n().load({
|
@@ -149,6 +159,13 @@
|
|
149
159
|
'commands.release_obj.dialog.confirm': 'Release',
|
150
160
|
'commands.release_obj.failed': 'Release failed',
|
151
161
|
|
162
|
+
'commands.edit_obj.title': 'Edit page',
|
163
|
+
'commands.edit_obj.dialog.title': 'Edit this page?',
|
164
|
+
'commands.edit_obj.dialog.description': 'A new version of this page will be created.',
|
165
|
+
'commands.edit_obj.dialog.placeholder': 'Comment',
|
166
|
+
'commands.edit_obj.dialog.confirm': 'Edit',
|
167
|
+
'commands.edit_obj.failed': 'Edit failed',
|
168
|
+
|
152
169
|
'commands.forward_obj.title': 'Forward page',
|
153
170
|
'commands.forward_obj.dialog.title': 'Forward this page?',
|
154
171
|
'commands.forward_obj.dialog.description': 'Forward and edited page is final. This operation cannot be reverted.',
|
@@ -158,14 +175,14 @@
|
|
158
175
|
|
159
176
|
'commands.reject_obj.title': 'Reject page',
|
160
177
|
'commands.reject_obj.dialog.title': 'Reject this page?',
|
161
|
-
'commands.reject_obj.dialog.description': '
|
178
|
+
'commands.reject_obj.dialog.description': 'Current page will be rejected. This operation cannot be reverted.',
|
162
179
|
'commands.reject_obj.dialog.placeholder': 'Comment',
|
163
180
|
'commands.reject_obj.dialog.confirm': 'Reject',
|
164
181
|
'commands.reject_obj.failed': 'Reject failed',
|
165
182
|
|
166
183
|
'commands.sign_obj.title': 'Sign page',
|
167
184
|
'commands.sign_obj.dialog.title': 'Sign this page?',
|
168
|
-
'commands.sign_obj.dialog.description': '
|
185
|
+
'commands.sign_obj.dialog.description': 'Committed page will be signed. This operation cannot be reverted.',
|
169
186
|
'commands.sign_obj.dialog.placeholder': 'Comment',
|
170
187
|
'commands.sign_obj.dialog.confirm': 'Sign',
|
171
188
|
'commands.sign_obj.failed': 'Signing failed',
|
@@ -182,19 +199,24 @@
|
|
182
199
|
'commands.take_obj.dialog.description': 'Die Arbeitsversion wird übernommen. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
183
200
|
'commands.take_obj.dialog.placeholder': 'Comment',
|
184
201
|
'commands.take_obj.dialog.confirm': 'Take',
|
185
|
-
'commands.take_obj.failed': 'Take failed'
|
202
|
+
'commands.take_obj.failed': 'Take failed',
|
203
|
+
|
204
|
+
'editing_disabled.workflow': 'The current page belongs to a workflow and cannot be edited directly.',
|
205
|
+
'editing_disabled.permissions': 'You do not have the permissions required to edit this page.'
|
186
206
|
}, 'en');
|
187
207
|
|
188
208
|
var dialog_icons = {
|
209
|
+
"edit": "",
|
189
210
|
"forward": "",
|
190
211
|
"reject": "",
|
191
|
-
"commit": "&#
|
212
|
+
"commit": "",
|
192
213
|
"sign": "",
|
193
214
|
"take": "",
|
194
215
|
"release": ""
|
195
216
|
};
|
196
217
|
|
197
218
|
var icons = {
|
219
|
+
"edit": "pen",
|
198
220
|
"forward": "check",
|
199
221
|
"reject": "cross",
|
200
222
|
"commit": "check",
|
@@ -202,69 +224,93 @@
|
|
202
224
|
"take": "exclamation",
|
203
225
|
"release": "globe"
|
204
226
|
};
|
205
|
-
var actions = ["forward", "reject","commit", "sign", "take"
|
206
|
-
actions = ["release"];
|
227
|
+
var actions = ["edit", "forward", "reject","commit", "sign", "take"];
|
207
228
|
|
208
229
|
scrivito.gui.on('document', function(cms_document) {
|
209
|
-
|
210
|
-
var obj
|
230
|
+
var page_config = (cms_document.page_config() || {})['current_page'] || {};
|
231
|
+
var obj = cms_document.page();
|
232
|
+
var buttons = page_config['buttons'] || [];
|
233
|
+
var workflow_enabled = page_config['workflow'];
|
234
|
+
|
235
|
+
if (cms_document.browser_window().name !== 'scrivito_application') {
|
236
|
+
// TODO: add special handling for scrivito_details_dialog and scrivito_inspector
|
237
|
+
return;
|
238
|
+
}
|
239
|
+
|
240
|
+
/* release button */
|
241
|
+
scrivito.page_menu(cms_document).add('fiona7.idx'+99+'.release_obj', {
|
242
|
+
title: scrivito.t('commands.release_obj.title'),
|
243
|
+
icon: icons['release'],
|
244
|
+
|
245
|
+
present: function() {
|
246
|
+
return scrivito.editing_context.selected_workspace.is_editable() && obj && (!workflow_enabled || (buttons.indexOf('release') !== -1));
|
247
|
+
},
|
211
248
|
|
212
|
-
|
249
|
+
disabled: function() {
|
250
|
+
if (!obj.modification()) {
|
251
|
+
return scrivito.t('commands.release_obj.not_modified_obj');
|
252
|
+
}
|
253
|
+
if (obj.has_restriction()) {
|
254
|
+
return obj.restriction_messages().join("; ");
|
255
|
+
}
|
256
|
+
},
|
257
|
+
|
258
|
+
update: function() {
|
259
|
+
return obj.reload();
|
260
|
+
},
|
261
|
+
|
262
|
+
execute: function() {
|
263
|
+
open_release_dialog(obj.id()).done(function(objIds, comment) {
|
264
|
+
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/release', {data: {objs: objIds, comment: comment}}).then(function() {
|
265
|
+
scrivito.reload();
|
266
|
+
}));
|
267
|
+
});
|
268
|
+
}
|
269
|
+
});
|
270
|
+
/* TODO: enforce permissions */
|
271
|
+
|
272
|
+
/* TODO: better sorting */
|
273
|
+
|
274
|
+
/* disable editing */
|
275
|
+
setTimeout(function (){
|
276
|
+
if (page_config['editing_disabled']) {
|
277
|
+
scrivito.editing_mode.disable(scrivito.t('editing_disabled.workflow'));
|
278
|
+
} else {
|
279
|
+
scrivito.editing_mode.enable();
|
280
|
+
}
|
281
|
+
}, 0);
|
282
|
+
|
283
|
+
/* add workflow buttons */
|
284
|
+
$.each(actions, function(idx, action) {
|
213
285
|
scrivito.page_menu(cms_document).add('fiona7.idx'+idx+'.'+action+'_obj', {
|
214
286
|
title: scrivito.t('commands.'+action+'_obj.title'),
|
215
287
|
icon: icons[action],
|
216
288
|
|
217
289
|
present: function() {
|
218
|
-
return
|
219
|
-
},
|
220
|
-
|
221
|
-
disabled: function() {
|
222
|
-
if (action == 'release' && !obj.modification()) {
|
223
|
-
return scrivito.t('commands.release_obj.not_modified_obj');
|
224
|
-
}
|
225
|
-
if (action == 'release' && obj.has_restriction()) {
|
226
|
-
return obj.restriction_messages().join("; ");
|
227
|
-
|
228
|
-
}
|
229
|
-
},
|
230
|
-
|
231
|
-
update: function() {
|
232
|
-
return obj.reload();
|
290
|
+
return buttons.indexOf(action) !== -1;
|
233
291
|
},
|
234
292
|
|
235
293
|
execute: function() {
|
236
|
-
|
237
|
-
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/
|
238
|
-
|
294
|
+
open_confirmation_dialog(action, dialog_icons[action]).done(function(comment) {
|
295
|
+
scrivito.with_saving_overlay(scrivito.ajax('PUT', 'objs/workflow/'+action, {data: {id: obj.id(), comment: comment}}).then(function() {
|
296
|
+
if (action == 'edit' || action == 'take') {
|
297
|
+
|
298
|
+
if (!scrivito.editing_context.is_editing_mode()) {
|
299
|
+
return scrivito.with_saving_overlay(
|
300
|
+
scrivito.change_editing_context({display_mode: 'editing', workspace_id: 'rtc'}));
|
301
|
+
} else {
|
302
|
+
return scrivito.with_saving_overlay(scrivito.reload());
|
303
|
+
}
|
304
|
+
} else {
|
305
|
+
return scrivito.with_saving_overlay(scrivito.reload());
|
306
|
+
}
|
239
307
|
}));
|
240
308
|
});
|
241
309
|
}
|
242
310
|
});
|
243
311
|
});
|
244
312
|
|
245
|
-
|
246
|
-
//var menu = cms_document.menu();
|
247
|
-
//menu.push(scrivito.command_separator.create_instance({id: 'fiona7.zz_sparator'}));
|
248
|
-
//cms_document.set_menu(menu);
|
249
|
-
|
250
|
-
//scrivito.configure_menu_order(['fiona7.*', '*']);
|
251
313
|
});
|
252
314
|
|
253
315
|
return;
|
254
|
-
|
255
|
-
/* enforce permissions */
|
256
|
-
var originalGuiStart = scrivito.gui.start;
|
257
|
-
scrivito.gui.start = function () {
|
258
|
-
originalGuiStart.call(this, arguments);
|
259
|
-
if (scrivito.in_editable_view()) {
|
260
|
-
if (!scrivito.user_permissions.can('write_obj')) {
|
261
|
-
$('.switch_to_view_mode').click();
|
262
|
-
}
|
263
|
-
} else {
|
264
|
-
if (!scrivito.user_permissions.can('write_obj')) {
|
265
|
-
$('.scrivito_viewmode_editing').remove();
|
266
|
-
}
|
267
|
-
}
|
268
|
-
};
|
269
|
-
|
270
316
|
}());
|
@@ -22,8 +22,29 @@
|
|
22
22
|
params.filename = params.filename.replace(/[^\w\-_\.$]/g, '-');
|
23
23
|
|
24
24
|
return $.extend(params, {is_uploaded_binary: true});
|
25
|
+
},
|
26
|
+
|
27
|
+
copy_binary: function(id, obj_id, attr_name, params) {
|
28
|
+
assert_valid_params(params);
|
29
|
+
|
30
|
+
return _.extend({
|
31
|
+
is_copied_binary: true,
|
32
|
+
id_to_copy: id,
|
33
|
+
obj_id: obj_id,
|
34
|
+
attr_name: attr_name
|
35
|
+
}, params);
|
25
36
|
}
|
26
37
|
}
|
27
38
|
});
|
28
39
|
|
40
|
+
|
41
|
+
var assert_valid_params = function(params) {
|
42
|
+
if (_.has(params, 'filename') && !params.filename) {
|
43
|
+
$.error('filename cannot be blank');
|
44
|
+
}
|
45
|
+
|
46
|
+
if (_.has(params, 'content_type') && !params.content_type) {
|
47
|
+
$.error('content_type cannot be blank');
|
48
|
+
}
|
49
|
+
};
|
29
50
|
}());
|
@@ -201,7 +201,7 @@
|
|
201
201
|
var current_page = scrivito.application_document().page();
|
202
202
|
var path = (typeof current_page.provided_path === 'function') && current_page.provided_path();
|
203
203
|
params = {};
|
204
|
-
params['
|
204
|
+
params['parent_path'] = path;
|
205
205
|
}
|
206
206
|
return scrivito.obj.fetch_class_selection('objs/page_class_selection', params);
|
207
207
|
},
|
@@ -46,8 +46,12 @@ module Fiona7
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def carefully_release(errors, obj, comment=nil)
|
49
|
-
obj.
|
50
|
-
|
49
|
+
if obj.really_edited?
|
50
|
+
# we don't care much if this fails
|
51
|
+
obj.take
|
52
|
+
obj.release!(comment)
|
53
|
+
::Fiona7.run_callbacks(:release_obj, obj.id)
|
54
|
+
end
|
51
55
|
|
52
56
|
complex_object = Fiona7::ComplexObject.new(obj)
|
53
57
|
complex_object.widgets.each do |widget_obj|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Fiona7
|
2
|
+
class WorkflowController < ActionController::Base
|
3
|
+
def edit
|
4
|
+
workflow_action('edit')
|
5
|
+
end
|
6
|
+
|
7
|
+
def take
|
8
|
+
workflow_action('take')
|
9
|
+
end
|
10
|
+
|
11
|
+
def forward
|
12
|
+
workflow_action('forward')
|
13
|
+
end
|
14
|
+
|
15
|
+
def commit
|
16
|
+
workflow_action('commit')
|
17
|
+
end
|
18
|
+
|
19
|
+
def sign
|
20
|
+
workflow_action('sign')
|
21
|
+
end
|
22
|
+
|
23
|
+
def reject
|
24
|
+
workflow_action('reject')
|
25
|
+
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
def workflow_action(action)
|
29
|
+
@obj = WriteObj.find(params[:id])
|
30
|
+
@comment = params[:comment]
|
31
|
+
|
32
|
+
if action == 'edit'
|
33
|
+
# TODO: this should be implemented in reactor.
|
34
|
+
@obj.edit!(@comment)
|
35
|
+
else
|
36
|
+
@obj.workflow.send(:"#{action}!", @comment)
|
37
|
+
end
|
38
|
+
|
39
|
+
render json: {}
|
40
|
+
rescue => e
|
41
|
+
Rails.logger.error("Error #{e.inspect} when executing workflow operation on #{@obj.id} with comment=#{@comment}")
|
42
|
+
render json: {message: e.message, message_for_editor: e.message}, status: 412
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -1,4 +1,20 @@
|
|
1
1
|
module Fiona7LoginHelper
|
2
|
+
def fiona7_login_path
|
3
|
+
fiona7_engine.fiona7_login_path
|
4
|
+
end
|
5
|
+
|
6
|
+
def fiona7_login_url
|
7
|
+
fiona7_engine.fiona7_login_url
|
8
|
+
end
|
9
|
+
|
10
|
+
def fiona7_logout_path
|
11
|
+
fiona7_engine.fiona7_logout_path
|
12
|
+
end
|
13
|
+
|
14
|
+
def fiona7_logout_url
|
15
|
+
fiona7_engine.fiona7_logout_url
|
16
|
+
end
|
17
|
+
|
2
18
|
def fiona7_logged_in?
|
3
19
|
rsession.user?
|
4
20
|
end
|
@@ -31,7 +31,7 @@ module Fiona7OverrideHelper
|
|
31
31
|
raise "This method can only be used in legacy mode" unless Fiona7.mode == :legacy
|
32
32
|
|
33
33
|
obj_or_widget = obj_or_widget.kind_of?(RailsConnector::BasicObj) ? obj_or_widget.scrivito_obj : obj_or_widget
|
34
|
-
scrivito_tag(tag_name, obj_or_widget, field_name, html_options, editing_options
|
34
|
+
scrivito_tag(tag_name, obj_or_widget, field_name, html_options, editing_options, &block)
|
35
35
|
end
|
36
36
|
|
37
37
|
def fiona7_tag_list(tag_name, obj, field_name, options = {}, &block)
|
@@ -0,0 +1 @@
|
|
1
|
+
Scrivito::PresetRoutes.install_delayed
|
@@ -0,0 +1,92 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
mount Fiona7::Engine, at: '/', as: :fiona7_engine
|
3
|
+
mount Scrivito::SdkEngine, at: '/', as: :scrivito_engine
|
4
|
+
end
|
5
|
+
|
6
|
+
Fiona7::Engine.routes.draw do
|
7
|
+
get '/_b/:id(/:name)' => 'fiona7/blobs#show', as: :fiona7_blob
|
8
|
+
|
9
|
+
match '/_b/:id(/:name)' => 'fiona7/blobs#query', as: :fiona7_blob_meta, via: [:head]
|
10
|
+
|
11
|
+
post '/_f7/login', to: 'fiona7/sessions#create', as: :fiona7_login
|
12
|
+
|
13
|
+
delete '/_f7/logout', to: 'fiona7/sessions#destroy', as: :fiona7_logout
|
14
|
+
|
15
|
+
put '/__scrivito/objs/release(.:format)', to: 'fiona7/release#release', as: :fiona7_release
|
16
|
+
|
17
|
+
put '/__scrivito/objs/workflow/edit(.:format)', to: 'fiona7/workflow#edit', as: :fiona7_workflow_edit
|
18
|
+
put '/__scrivito/objs/workflow/take(.:format)', to: 'fiona7/workflow#take', as: :fiona7_workflow_take
|
19
|
+
put '/__scrivito/objs/workflow/forward(.:format)', to: 'fiona7/workflow#forward', as: :fiona7_workflow_forward
|
20
|
+
put '/__scrivito/objs/workflow/commit(.:format)', to: 'fiona7/workflow#commit', as: :fiona7_workflow_commit
|
21
|
+
put '/__scrivito/objs/workflow/sign(.:format)', to: 'fiona7/workflow#sign', as: :fiona7_workflow_sign
|
22
|
+
put '/__scrivito/objs/workflow/reject(.:format)', to: 'fiona7/workflow#reject', as: :fiona7_workflow_reject
|
23
|
+
|
24
|
+
|
25
|
+
get '/__scrivito/objs/:id/release/preview(.:format)', to: 'fiona7/release#preview', as: :fiona7_release_preview
|
26
|
+
end
|
27
|
+
|
28
|
+
Scrivito::SdkEngine.routes.draw do
|
29
|
+
get 'scrivito', to: 'scrivito/ui#index'
|
30
|
+
get 'scrivito/*application_path', to: 'scrivito/ui#index', format: false
|
31
|
+
|
32
|
+
scope '__scrivito', module: 'scrivito' do
|
33
|
+
get ':id', to: 'cms_dispatch#index', as: :base_id, constraints: {id: /\h{4,}/}
|
34
|
+
|
35
|
+
resources :objs, controller: 'objs', only: [:show, :create, :update, :destroy],
|
36
|
+
defaults: {format: :json} do
|
37
|
+
collection do
|
38
|
+
get :page_class_selection
|
39
|
+
get :search
|
40
|
+
end
|
41
|
+
|
42
|
+
member do
|
43
|
+
get :widget
|
44
|
+
get :widget_class_selection
|
45
|
+
get :widget_modification
|
46
|
+
get :conflicting_workspaces
|
47
|
+
get :is_outdated
|
48
|
+
get :binary_no_cache
|
49
|
+
|
50
|
+
post :copy
|
51
|
+
post :duplicate
|
52
|
+
|
53
|
+
put :revert
|
54
|
+
put :restore
|
55
|
+
put :mark_resolved
|
56
|
+
put :revert_widget
|
57
|
+
put :restore_widget
|
58
|
+
put :transfer_modifications
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
resources :tasks, controller: 'tasks', only: [:show], defaults: {format: :json}
|
63
|
+
|
64
|
+
get 'blobs/upload_permission' => 'blobs#upload_permission', defaults: {format: :json}
|
65
|
+
put 'blobs/activate_upload' => 'blobs#activate_upload', defaults: {format: :json}
|
66
|
+
put 'blobs/copy' => 'blobs#copy', defaults: {format: :json}
|
67
|
+
|
68
|
+
resources :workspaces,
|
69
|
+
controller: 'workspaces',
|
70
|
+
only: [:index, :show, :create, :destroy],
|
71
|
+
defaults: {format: :json} do
|
72
|
+
member do
|
73
|
+
put :rename
|
74
|
+
put :memberships
|
75
|
+
put :rebase
|
76
|
+
put :publish
|
77
|
+
get :check
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
get 'users/suggest' => 'users#suggest', defaults: {format: :json}
|
82
|
+
get 'suggest_completion' => 'completion#suggest', defaults: {format: :json}
|
83
|
+
|
84
|
+
get 'render_widget/:id/show_widget/:widget_id' => 'cms_dispatch#show_widget'
|
85
|
+
get 'render_widget/:id/widget_details/:widget_id' => 'cms_dispatch#widget_details'
|
86
|
+
|
87
|
+
get 'page_details/:id' => 'cms_dispatch#page_details'
|
88
|
+
get 'resource_details/:resource_id', to: 'ui#index'
|
89
|
+
|
90
|
+
get 'to_binary' => 'binary_redirect#to_binary', as: :binary
|
91
|
+
end
|
92
|
+
end
|