devbug/app/views/dash_v1/share.pug

89 lines
4.0 KiB
Plaintext

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 === project.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === project.user_id)
li.action-li
a.action(href='/dash/v1/project/share/'+project.id+'/revoke/'+user.uuid) Revoke
li
a.action(href='/dash/v1/project/share/'+project.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 === project.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === project.user_id)
li.action-li
a.action(href='/dash/v1/project/share/'+project.id+'/revoke/'+user.uuid+'/edit') Revoke
li
a.action(href='/dash/v1/project/share/'+project.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/project/share/'+project.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 === project.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === project.user_id)
li.action-li
a.action(href='/dash/v1/project/share/' + project.id + '/share/'+user.uuid) Share (View)
li.action-li
a.action(href='/dash/v1/project/share/' + project.id + '/share/'+user.uuid+'/edit') Share (Edit)
else
li.action-li
strike Share
li.action-li
a.action(href='/dash/v1/project/share/' + project.id + '/transfer/' + user.uuid) Transfer Ownership