You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
4.0 KiB

extends ./template
block content
h2 Owned By
table
thead
tr
th(scope='col' style='min-width: 250px') Username
tbody
tr
td #{(sharing.current_owns ? `You (${sharing.owner.username})` : sharing.owner.username)}
if sharing.read.length > 0
br
h2 Shared With (Read-Only)
table
thead
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.read
tr
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === item.user_id)
li.action-li
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/revoke/'+user.uuid) Revoke
li.action-li
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/transfer/'+user.uuid) Transfer Ownership
else
li.action-li
strike Revoke
li.action-li
strike Transfer Ownership
if sharing.edit.length > 0
br
h2 Shared With (Edit)
table
thead
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.edit
tr
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === item.user_id)
li.action-li
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/revoke/'+user.uuid+'/edit') Revoke
li.action-li
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/transfer/'+user.uuid) Transfer Ownership
else
li.action-li
strike Revoke
li.action-li
strike Transfer Ownership
br
h2 Share With New User
a.btn(href='/dash/v1/'+api+'/share/'+item.id+'/invite') Generate Sharing Link
if sharing.other.length > 0
br
br
table
thead
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.other
tr
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === item.user_id)
li.action-li
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/share/'+user.uuid) Share (View)
li.action-li
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/share/'+user.uuid+'/edit') Share (Edit)
else
li.action-li
strike Share
li.action-li
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/transfer/' + user.uuid) Transfer Ownership