devbug/app/views/dash_v1/share.pug

89 lines
4.0 KiB
Plaintext
Raw Permalink Normal View History

2019-06-23 17:17:35 +00:00
extends ./template
block content
h2 Owned By
2019-06-23 17:17:35 +00:00
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
2019-06-23 17:17:35 +00:00
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.read
tr
2019-07-24 14:52:58 +00:00
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
2019-07-24 14:52:58 +00:00
if !(user.uuid === item.user_id)
2019-07-22 14:55:37 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/revoke/'+user.uuid) Revoke
2019-07-24 20:30:51 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/transfer/'+user.uuid) Transfer Ownership
else
2019-07-22 14:55:37 +00:00
li.action-li
strike Revoke
2019-07-22 14:55:37 +00:00
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
2019-07-24 14:52:58 +00:00
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
2019-07-24 14:52:58 +00:00
if !(user.uuid === item.user_id)
2019-07-22 14:55:37 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/revoke/'+user.uuid+'/edit') Revoke
2019-07-24 20:30:51 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/'+item.id+'/transfer/'+user.uuid) Transfer Ownership
else
2019-07-22 14:55:37 +00:00
li.action-li
strike Revoke
2019-07-22 14:55:37 +00:00
li.action-li
strike Transfer Ownership
2019-06-23 17:17:35 +00:00
br
h2 Share With New User
2019-07-24 14:52:58 +00:00
a.btn(href='/dash/v1/'+api+'/share/'+item.id+'/invite') Generate Sharing Link
if sharing.other.length > 0
br
br
table
thead
2019-06-23 17:17:35 +00:00
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.other
tr
2019-07-24 14:52:58 +00:00
td #{(user.uuid === item.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
2019-07-24 14:52:58 +00:00
if !(user.uuid === item.user_id)
2019-07-22 14:55:37 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/share/'+user.uuid) Share (View)
2019-07-22 14:55:37 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/share/'+user.uuid+'/edit') Share (Edit)
else
2019-07-22 14:55:37 +00:00
li.action-li
strike Share
2019-07-22 14:55:37 +00:00
li.action-li
2019-07-24 14:52:58 +00:00
a.action(href='/dash/v1/'+api+'/share/' + item.id + '/transfer/' + user.uuid) Transfer Ownership