diff options
author | Mario <mario@mariovavti.com> | 2017-09-15 22:17:18 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2017-09-15 22:17:18 +0200 |
commit | 373651c3dbb9d6d79b9c5a1519a7ef336f2d615e (patch) | |
tree | d71bc0bb8ab6880f10df4684296189d401e96171 /view/tpl/wikilist.tpl | |
parent | 663802e6992858c026a4e9b325575bc064cc687d (diff) | |
download | volse-hubzilla-373651c3dbb9d6d79b9c5a1519a7ef336f2d615e.tar.gz volse-hubzilla-373651c3dbb9d6d79b9c5a1519a7ef336f2d615e.tar.bz2 volse-hubzilla-373651c3dbb9d6d79b9c5a1519a7ef336f2d615e.zip |
implement wiki editing
Diffstat (limited to 'view/tpl/wikilist.tpl')
-rw-r--r-- | view/tpl/wikilist.tpl | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/view/tpl/wikilist.tpl b/view/tpl/wikilist.tpl index 51d24c195..c706ec27d 100644 --- a/view/tpl/wikilist.tpl +++ b/view/tpl/wikilist.tpl @@ -40,32 +40,34 @@ <tr class="wikis-index-row"> <td><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="{{$view}}"{{if $wiki.active}} class="active"{{/if}}>{{$wiki.title}}</a></td> <td>{{if $wiki.typelock}}{{$wiki.mimeType}}{{else}}{{$unlocked}}{{/if}}</td> - <td class="wiki-index-tool dropdown"> - {{if $wiki.lock}} - <button class="btn btn-default btn-sm" onclick="lockview('item',{{$wiki.id}});"><i class="fa fa-lock lockview" data-toggle="dropdown" ></i></button> + <td class="wikis-index-tool"><i class="fa fa-pencil" onclick="openCloseTR('wikis-index-edit-{{$wiki.id}}')"></i></td> + <td class="wikis-index-tool dropdown"> + {{if $wiki.lockstate == 'lock'}} + <i class="fa fa-lock lockview" data-toggle="dropdown" onclick="lockview('item',{{$wiki.id}});"></i> <ul id="panel-{{$wiki.id}}" class="lockview-panel dropdown-menu dropdown-menu-right"></ul> {{/if}} </td> - <td class="wiki-index-tool"><button class="btn btn-default btn-sm" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;"><i class="fa fa-download fakelink" ></i></button></td> + <td class="wikis-index-tool"><i class="fa fa-download" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;"></i></td> {{if $owner}} - <td> </td> - <td><button class="btn btn-default btn-sm" onclick="wiki_delete_wiki('{{$wiki.title}}', '{{$wiki.resource_id}}'); return false;"><i class="fa fa-trash-o drop-icons" ></i></button></td> + <td><i class="fa fa-trash-o drop-icons" onclick="wiki_delete_wiki('{{$wiki.title}}', '{{$wiki.resource_id}}'); return false;"></i></td> {{/if}} </tr> - <tr> - <td colspan="4"> - <form id="edit-wiki-form-{{$wiki.id}}" method="post" action="wiki/{{$channel}}/update/wiki" class="acl-form" data-form_id="edit-wiki-form-{{$wiki.id}}" data-allow_cid='{{$wiki.allow_cid}}' data-allow_gid='{{$wiki.allow_gid}}' data-deny_cid='{{$wiki.deny_cid}}' data-deny_gid='{{$wiki.deny_gid}}'> + {{if $owner}} + <tr id="wikis-index-edit-{{$wiki.id}}" style="display:none"> + <td colspan="6"> + <form id="edit-wiki-form-{{$wiki.id}}" method="post" action="wiki/{{$channel}}/update/wiki" class="acl-form" data-form_id="edit-wiki-form-{{$wiki.id}}" data-allow_cid='{{$wiki.json_allow_cid}}' data-allow_gid='{{$wiki.json_allow_gid}}' data-deny_cid='{{$wiki.json_deny_cid}}' data-deny_gid='{{$wiki.json_deny_gid}}'> + <input type="hidden" name="origRawName" value="{{$wiki.title}}"> + {{include file="field_input.tpl" field=['updateRawName', 'Edit Wiki Name', $wiki.title]}} <div class="btn-group float-right"> - {{if $lockstate}} <button class="btn btn-outline-secondary btn-sm" data-toggle="modal" data-target="#aclModal" type="button"> - <i class="jot-perms-icon fa fa-{{$lockstate}}"></i> + <i class="jot-perms-icon fa fa-{{$wiki.lockstate}}"></i> </button> - {{/if}} <button class="btn btn-primary btn-sm" type="submit" value="edit">Submit</button> </div> </form> </td> </tr> + {{/if}} {{/foreach}} </table> </div> |