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'],
|
'$channel' => $channel['channel_address'],
|
||||||
'$wikis' => $wikis['wikis'],
|
'$wikis' => $wikis['wikis'],
|
||||||
// If the observer is the local channel owner, show the wiki controls
|
// 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 '';
|
return '';
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
{{foreach $wikis as $wiki}}
|
{{foreach $wikis as $wiki}}
|
||||||
<div class="form-group" id="wiki-{{$wiki.resource_id}}">
|
<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>
|
<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>
|
{{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>
|
<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>
|
</div>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user