list.php 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. <fieldset>
  2. <legend><?php echo $l->t('Your Shared Files');?></legend>
  3. <table id="itemlist">
  4. <thead>
  5. <tr>
  6. <th><?php echo $l->t('Item');?></th>
  7. <th><?php echo $l->t('Shared With');?></th>
  8. <th><?php echo $l->t('Permissions');?></th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <?php foreach($_['shared_items'] as $item):?>
  13. <tr class="item">
  14. <td class="source"><?php echo substr($item['source'], strlen("/".$_SESSION['user_id']."/files/"));?></td>
  15. <td class="uid_shared_with"><?php echo $item['uid_shared_with'];?></td>
  16. <td class="permissions"><?php echo $l->t('Read'); echo($item['permissions'] & OC_SHARE::WRITE ? ", ".$l->t('Edit') : ""); echo($item['permissions'] & OC_SHARE::DELETE ? ", ".$l->t('Delete') : "");?></td>
  17. <td><button class="delete" data-source="<?php echo $item['source'];?>" data-uid_shared_with="<?php echo $item['uid_shared_with'];?>"><?php echo $l->t('Delete');?></button></td>
  18. </tr>
  19. <?php endforeach;?>
  20. <tr id="share_item_row">
  21. <form action="#" id="share_item">
  22. <td class="source"><input placeholder="Item" id="source" /></td>
  23. <td class="uid_shared_with"><input placeholder="Share With" id="uid_shared_with" /></td>
  24. <td class="permissions"><input placeholder="Permissions" id="permissions" /></td>
  25. <td><input type="submit" value="Share" /></td>
  26. </form>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </fieldset>