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