filestorage re-org and cleanup
This commit is contained in:
parent
e49e6c0d2a
commit
2f27d58dfe
@ -93,7 +93,7 @@ function filestorage_content(&$a) {
|
||||
}
|
||||
$file = intval(argv(2));
|
||||
|
||||
$r = q("select id, folder, filename, flags, hash, allow_cid, allow_gid, deny_cid, deny_gid from attach where id = %d and uid = %d limit 1",
|
||||
$r = q("select id, folder, filename, revision, flags, hash, allow_cid, allow_gid, deny_cid, deny_gid from attach where id = %d and uid = %d limit 1",
|
||||
intval($file),
|
||||
intval($owner)
|
||||
);
|
||||
@ -117,6 +117,7 @@ function filestorage_content(&$a) {
|
||||
'$recurse' => t('Include all files and sub folders'),
|
||||
'$backlink' => t('Return to file list'),
|
||||
'$isadir' => $is_a_dir,
|
||||
'$cpdesc' => t('Copy/paste this code to attach file to a post'),
|
||||
'$submit' => t('Submit')
|
||||
|
||||
));
|
||||
@ -156,10 +157,11 @@ function filestorage_content(&$a) {
|
||||
'$download' => t('Download'),
|
||||
'$files' => $files,
|
||||
'$channel' => $which,
|
||||
'$edit' => t('Edit Permissions'),
|
||||
'$edit' => t('Edit'),
|
||||
'$delete' => t('Delete'),
|
||||
'$used' => $used,
|
||||
'$usedlabel' => t('Used: '),
|
||||
'$directory' => t('[directory]'),
|
||||
'$limit' => $limit,
|
||||
'$limitlabel' => t('Limit: '),
|
||||
));
|
||||
|
@ -14,11 +14,18 @@
|
||||
<input type="hidden" name="uid" value="{{$uid}}" />
|
||||
<input type="hidden" name="fileid" value="{{$file.id}}" />
|
||||
|
||||
|
||||
{{if $isadir}}
|
||||
<div id="attach-edit-recurse" >
|
||||
<label id="attach-edit-recurse-text" for="attach-recurse-input" >{{$recurse}}</label>
|
||||
<input id="attach-recurse-input" type="checkbox" name="recurse" value="1" />
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="cut-paste-desc">{{$cpdesc}}</div>
|
||||
<div id="cut-paste-link">
|
||||
<input type="text" id="cutpasteinput" name="cutpastelink" value="[attachment]{{$file.hash}},{{$file.revision}}[/attachment]" />
|
||||
<script>$('#cutpasteinput').select();</script>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div id="attach-edit-perms" >
|
||||
@ -26,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<input type="submit" name="submit" value="{{$submit}}" />
|
||||
<input id="attach-edit-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
</form>
|
||||
|
||||
|
||||
|
@ -7,11 +7,10 @@
|
||||
{{foreach $files as $key => $items}}
|
||||
{{foreach $items as $item}}
|
||||
<div class="files-list-item">
|
||||
<a href="{{$baseurl}}/{{$item.id}}/edit">{{$edit}}</a> |
|
||||
<a href="{{$baseurl}}/{{$item.id}}/delete">{{$delete}}</a> |
|
||||
[attachment]{{$item.download}},{{$item.rev}}[/attachment] |
|
||||
{{if ! $item.dir}}<a href="attach/{{$item.download}}">{{/if}}{{$item.title}}{{if ! $item.dir}}</a>{{/if}} |
|
||||
{{$item.size}} bytes
|
||||
<a href="{{$baseurl}}/{{$item.id}}/edit">{{$edit}}</a> |
|
||||
<a href="{{$baseurl}}/{{$item.id}}/delete">{{$delete}}</a> |
|
||||
{{if ! $item.dir}}<a href="attach/{{$item.download}}">{{/if}}{{$item.title}}{{if ! $item.dir}}</a>{{/if}}
|
||||
{{if ! $item.dir}} | {{$item.size}} bytes{{else}}{{$directory}}{{/if}}
|
||||
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
Reference in New Issue
Block a user