-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpads.php
More file actions
60 lines (46 loc) · 1.69 KB
/
pads.php
File metadata and controls
60 lines (46 loc) · 1.69 KB
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
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Pads' clonable='1' routable='1'>
<cms:editable
type='relation'
has='one'
masterpage='users/index.php'
name='pad_owner'
label='Owner'
no_guix='1'
required='1'
/>
<!-- define routes -->
<cms:route
name='page_view'
path='{:id}'
filters='authenticated | pad_exists | owns_pad'
>
<cms:route_validators
id='non_zero_integer'
/>
</cms:route>
<cms:route name='create_view' path='create' filters='authenticated' />
<cms:route
name='edit_view'
path='{:id}/edit'
filters='authenticated | pad_exists | owns_pad'
>
<cms:route_validators
id='non_zero_integer'
/>
</cms:route>
<cms:route
name='delete_view'
path='{:id}/delete'
filters='authenticated | pad_exists | owns_pad'
>
<cms:route_validators
id='non_zero_integer'
/>
</cms:route>
</cms:template>
<!-- find the matched route (view). Respond with 404 if no route matches. -->
<cms:match_route debug='0' is_404='1' />
<!-- and invoke snippet corresponding to the selected view -->
<cms:embed "views/pads/<cms:show k_matched_route />.html" />
<?php COUCH::invoke( K_IGNORE_CONTEXT ); ?>