aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-06-05 21:12:42 -0700
committerzotlabs <mike@macgirvin.com>2018-06-05 21:12:42 -0700
commitd6f98ab88ec147b317bc9266395320e9cc64329a (patch)
tree3adf022b96a3d09db6067adf51b4b4fe6c007e42 /view/tpl
parente1b85a361cf53fd7bb79ef24d9d5b0dfb145fccf (diff)
downloadvolse-hubzilla-d6f98ab88ec147b317bc9266395320e9cc64329a.tar.gz
volse-hubzilla-d6f98ab88ec147b317bc9266395320e9cc64329a.tar.bz2
volse-hubzilla-d6f98ab88ec147b317bc9266395320e9cc64329a.zip
some work to make menus editable by visitors with webpage write permissions; this needed to revise the link structure so that the page specified an owner channel in the url. Otherwise we could only operate on menus owned by local_channel(). Have done some basic regression testing but have not yet fully tested guest editing functionality.
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/design_tools.tpl2
-rw-r--r--view/tpl/menuedit.tpl2
-rw-r--r--view/tpl/menulist.tpl6
-rw-r--r--view/tpl/mitemedit.tpl2
-rw-r--r--view/tpl/mitemlist.tpl4
5 files changed, 8 insertions, 8 deletions
diff --git a/view/tpl/design_tools.tpl b/view/tpl/design_tools.tpl
index bc7d46dc1..b4657cb7f 100644
--- a/view/tpl/design_tools.tpl
+++ b/view/tpl/design_tools.tpl
@@ -2,7 +2,7 @@
<h3>{{$title}}</h3>
<div class="nav nav-pills flex-column">
<a class="nav-link" href="blocks/{{$who}}">{{$blocks}}</a>
- <a class="nav-link" href="menu{{if $sys}}?f=&sys=1{{/if}}">{{$menus}}</a>
+ <a class="nav-link" href="menu/{{$who}}">{{$menus}}</a>
<a class="nav-link" href="layouts/{{$who}}">{{$layout}}</a>
<a class="nav-link" href="webpages/{{$who}}">{{$pages}}</a>
</div>
diff --git a/view/tpl/menuedit.tpl b/view/tpl/menuedit.tpl
index 84b16dc0b..3558bdbaa 100644
--- a/view/tpl/menuedit.tpl
+++ b/view/tpl/menuedit.tpl
@@ -11,7 +11,7 @@
</div>
{{/if}}
<div id="menu-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
- <form id="menuedit" action="menu{{if $menu_id}}/{{$menu_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" >
+ <form id="menuedit" action="menu/{{$nick}}{{if $menu_id}}/{{$menu_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" >
{{if $menu_id}}
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
{{/if}}
diff --git a/view/tpl/menulist.tpl b/view/tpl/menulist.tpl
index e23035062..f9c925472 100644
--- a/view/tpl/menulist.tpl
+++ b/view/tpl/menulist.tpl
@@ -25,11 +25,11 @@
{{foreach $menus as $m }}
<tr id="menu-list-item-{{$m.menu_id}}">
<td>{{if $m.bookmark}}<i class="fa fa-bookmark menu-list-tool" title="{{$bmark}}" ></i>{{/if}}</td>
- <td><a href="mitem/{{$m.menu_id}}{{if $sys}}?f=&sys=1{{/if}}" title="{{$hintcontent}}">{{$m.menu_name}}</a></td>
+ <td><a href="mitem/{{$nick}}/{{$m.menu_id}}{{if $sys}}?f=&sys=1{{/if}}" title="{{$hintcontent}}">{{$m.menu_name}}</a></td>
<td>{{$m.menu_desc}}</td>
- <td class="menu-list-tool"><a href="menu/{{$m.menu_id}}{{if $sys}}?f=&sys=1{{/if}}" title="{{$hintedit}}"><i class="fa fa-pencil"></i></a></td>
+ <td class="menu-list-tool"><a href="menu/{{$nick}}/{{$m.menu_id}}{{if $sys}}?f=&sys=1{{/if}}" title="{{$hintedit}}"><i class="fa fa-pencil"></i></a></td>
<td class="menu-list-tool"><a href="rpost?attachment={{$m.element}}" title="{{$share}}"><i class="fa fa-share-square-o"></i></a></td>
- <td class="menu-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('menu/{{$m.menu_id}}/drop{{if $sys}}?f=&sys=1{{/if}}', '#menu-list-item-{{$m.menu_id}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a></td>
+ <td class="menu-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('menu/{{$nick}}/{{$m.menu_id}}/drop{{if $sys}}?f=&sys=1{{/if}}', '#menu-list-item-{{$m.menu_id}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a></td>
<td class="d-none d-md-table-cell">{{$m.menu_created}}</td>
<td class="d-none d-md-table-cell">{{$m.menu_edited}}</td>
</tr>
diff --git a/view/tpl/mitemedit.tpl b/view/tpl/mitemedit.tpl
index 9f696fc23..36be0b207 100644
--- a/view/tpl/mitemedit.tpl
+++ b/view/tpl/mitemedit.tpl
@@ -5,7 +5,7 @@
</div>
{{/if}}
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
- <form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" class="acl-form" data-form_id="mitemedit" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
+ <form id="mitemedit" action="mitem/{{$nick}}/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" class="acl-form" data-form_id="mitemedit" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
{{if $mitem_id}}
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
diff --git a/view/tpl/mitemlist.tpl b/view/tpl/mitemlist.tpl
index b28cdfc7e..1e6302868 100644
--- a/view/tpl/mitemlist.tpl
+++ b/view/tpl/mitemlist.tpl
@@ -24,8 +24,8 @@
<td width="1%">{{$m.mitem_desc}}</td>
<td width="96%"><a href="{{$m.mitem_link}}">{{$m.mitem_link}}</a></td>
<td width="1%" class="mitem-list-tool dropdown">{{if $m.allow_cid || $m.allow_gid || $m.deny_cid || $m.deny_gid}}<i class="fa fa-lock lockview" data-toggle="dropdown" onclick="lockview('menu_item',{{$m.mitem_id}});" ></i><ul id="panel-{{$m.mitem_id}}" class="lockview-panel dropdown-menu"></ul>{{/if}}</td>
- <td width="1%" class="mitem-list-tool"><a href="mitem/{{$menu_id}}/{{$m.mitem_id}}" title="{{$hintedit}}"><i class="fa fa-pencil"></i></a></td>
- <td width="1%" class="mitem-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('mitem/{{$menu_id}}/{{$m.mitem_id}}/drop', '#mitem-list-item-{{$m.mitem_id}}, #pmenu-item-{{$m.mitem_id}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a></td>
+ <td width="1%" class="mitem-list-tool"><a href="mitem/{{$nick}}/{{$menu_id}}/{{$m.mitem_id}}" title="{{$hintedit}}"><i class="fa fa-pencil"></i></a></td>
+ <td width="1%" class="mitem-list-tool"><a href="#" title="{{$hintdrop}}" onclick="dropItem('mitem/{{$nick}}/{{$menu_id}}/{{$m.mitem_id}}/drop', '#mitem-list-item-{{$m.mitem_id}}, #pmenu-item-{{$m.mitem_id}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a></td>
</tr>
{{/foreach}}
</table>