show wiki controls only to owner and whitespace fixes
This commit is contained in:
parent
cf5c803fe0
commit
192df273cc
@ -917,7 +917,7 @@ function widget_wiki_list($arr) {
|
||||
'$channel' => $channel['channel_address'],
|
||||
'$wikis' => $wikis['wikis'],
|
||||
// If the observer is the local channel owner, show the wiki controls
|
||||
'$showControls' => ((local_channel() === intval($channel['channel_id'])) ? true : false)
|
||||
'$owner' => ((local_channel() === intval($channel['channel_id'])) ? true : false)
|
||||
));
|
||||
}
|
||||
return '';
|
||||
|
@ -2,11 +2,13 @@
|
||||
<h3>{{$header}}</h3>
|
||||
<div>
|
||||
{{foreach $wikis as $wiki}}
|
||||
<div class="form-group" id="wiki-{{$wiki.resource_id}}">
|
||||
<a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="View {{$wiki.title}}"><b>{{$wiki.title}}</b></a>
|
||||
<i class="pull-right generic-icons fakelink fa fa-trash-o" onclick="wiki_delete_wiki('{{$wiki.title}}','{{$wiki.resource_id}}'); return false;" title="Delete {{$wiki.title}}"></i>
|
||||
<i class="pull-right generic-icons fakelink fa fa-download" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;" title="Download {{$wiki.title}}"></i>
|
||||
</div>
|
||||
<div class="form-group" id="wiki-{{$wiki.resource_id}}">
|
||||
<a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="View {{$wiki.title}}"><b>{{$wiki.title}}</b></a>
|
||||
{{if $owner}}
|
||||
<i class="pull-right drop-icons fakelink fa fa-trash-o" onclick="wiki_delete_wiki('{{$wiki.title}}','{{$wiki.resource_id}}'); return false;" title="Delete {{$wiki.title}}"></i>
|
||||
<i class="pull-right generic-icons fakelink fa fa-download" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;" title="Download {{$wiki.title}}"></i>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user