Изменения документа homeopathsSheet

Редактировал(а) Jip-jan Alunkel марта 26, 17:31

От версии 1.6
отредактировано Jip-jan Alunkel
на марта 06, 22:52
Изменить комментарий: К данной версии нет комментариев
К версии 1.7
отредактировано Jip-jan Alunkel
на марта 07, 13:36
Изменить комментарий: К данной версии нет комментариев

Сводка

Подробности

Свойства страницы
Содержимое
... ... @@ -9,18 +9,18 @@
9 9  #set($isInline = $xcontext.action == 'edit' && $request.get('editor') == 'inline')
10 10  ## Create object (important for sheet binding, do not remove)
11 11  #set($theDocObj = $doc.getObject("homeopaths.Code.homeopathsClass", true))
12 -#set($hasRight = $theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin)
12 +#set($hasRight = !$isGuest && ($theDocObj.getProperty('user').value == $context.getUser() || $hasAdmin))
13 13  $theDoc.getContent()
14 14  
15 15  $hasRight
16 16  
17 17  {{html wiki="true" clean="false"}}
18 - #if(!$isGuest)
18 +#if(!$isGuest)
19 19  <script>
20 20   var pagemakerOffspring = "disable";
21 21  </script>
22 - #end
23 - #if(!$isGuest)
22 +#end
23 +#if($hasRight)
24 24   <p class="buttons text-align-right">
25 25   <a class="btn btn-primary" title="Edit" href="$doc.getURL("edit")?editor=wysiwyg" role="button" rel="nofollow">
26 26   <span class="fa fa-pencil"></span>
... ... @@ -27,7 +27,7 @@
27 27   <span class="btn-label">Edit contents</span>
28 28   </a>
29 29   </p>
30 - #end
30 +#end
31 31  #set($spaceReference = $services.model.resolveDocument('', 'default', $doc.documentReference.lastSpaceReference).parent)
32 32  #set($spaceTitle = $spaceReference.getName())
33 33  <div class="clearfix"></div>
... ... @@ -42,7 +42,7 @@
42 42   Countries over the world have different rules regarding the neccessity of a medical degree to practice homeopathy.
43 43   </p>
44 44   </div>
45 - #if(!$isGuest)
45 + #if($hasRight)
46 46   <p class="buttons text-align-right">
47 47   <a class="btn btn-secondary" title="Edit" data-toggle="modal" data-target="#detailsModal" role="button" rel="nofollow">
48 48   <span class="btn-label">Edit details</span>
... ... @@ -50,7 +50,7 @@
50 50   </p>
51 51   #end
52 52  </div>
53 - #if(!$isGuest) ## Ook de rechts situatie uitlezen en meenemen.
53 + #if($hasRight) ## Ook de rechts situatie uitlezen en meenemen.
54 54   #set($form_start = {
55 55   "id": "homeopaths_form",
56 56   "product": "homeopath details",
... ... @@ -99,6 +99,8 @@
99 99   </div>
100 100  </div>
101 101   #end
102 +#else
103 + This page can not be viewed in inline mode.
102 102  #end
103 103  {{/html}}
104 104  {{/velocity}}