Project Edit: Cleanup and styling
This commit is contained in:
@@ -2,70 +2,70 @@
|
||||
| {% set title = 'sharing' %}
|
||||
| {% block page_title %}Sharing: {{ project.name }}{% endblock %}
|
||||
|
||||
| {% block project_context_header %}
|
||||
span#project-edit-title
|
||||
| Manage team members for this project
|
||||
| {% endblock %}
|
||||
|
||||
| {% block project_context %}
|
||||
#node-edit-container
|
||||
#node-edit-form
|
||||
.col-md-6
|
||||
| {% if (project.user == current_user.objectid or current_user.has_cap('admin')) %}
|
||||
.sharing-users-search
|
||||
.form-group
|
||||
.row
|
||||
.col-md-12
|
||||
h5.mb-1 Team Management
|
||||
|
||||
hr
|
||||
|
||||
.row
|
||||
.col-md-6
|
||||
ul.sharing-users-list
|
||||
| {% for user in users %}
|
||||
li.sharing-users-item(
|
||||
user-id="{{ user['_id'] }}",
|
||||
class="{% if current_user.objectid == user['_id'] %}self{% endif %}")
|
||||
.sharing-users-avatar
|
||||
img(src="{{ user['avatar'] }}")
|
||||
.sharing-users-details
|
||||
span.sharing-users-name
|
||||
| {{user['full_name']}}
|
||||
| {% if project.user == user['_id'] and current_user.objectid == user['_id'] %}
|
||||
small (You, owner)
|
||||
| {% elif project.user == user['_id'] %}
|
||||
small (Owner)
|
||||
| {% elif current_user.objectid == user['_id'] %}
|
||||
small (You)
|
||||
| {% endif %}
|
||||
span.sharing-users-extra {{user['username']}}
|
||||
.sharing-users-action
|
||||
| {# Only allow deletion if we are: admin, project owners, or current_user in the team #}
|
||||
| {% if current_user.has_cap('admin') or (project.user == current_user.objectid) or (current_user.objectid == user['_id']) %}
|
||||
|
||||
| {% if project.user == user['_id'] %}
|
||||
span
|
||||
i.pi-happy(title="Hi boss!")
|
||||
| {% elif current_user.objectid == user['_id'] %}
|
||||
button.user-remove(title="Leave this project") Leave
|
||||
| {% else %}
|
||||
button.user-remove(title="Remove this user from your project")
|
||||
i.pi-trash
|
||||
| {% endif %}
|
||||
|
||||
| {% endif %}
|
||||
| {% endfor %}
|
||||
|
||||
.col-md-6
|
||||
| {% if (project.user == current_user.objectid or current_user.has_cap('admin')) %}
|
||||
.sharing-users-search
|
||||
input#user-select.form-control(
|
||||
name='contacts',
|
||||
type='text',
|
||||
placeholder='Add team members by name')
|
||||
| {% else %}
|
||||
.sharing-users-search
|
||||
.disabled Only project owners & admins can manage users
|
||||
| {% endif %}
|
||||
| {% else %}
|
||||
.sharing-users-search
|
||||
.disabled Only project owners & admins can manage users
|
||||
| {% endif %}
|
||||
|
||||
|
||||
ul.sharing-users-list
|
||||
| {% for user in users %}
|
||||
li.sharing-users-item(
|
||||
user-id="{{ user['_id'] }}",
|
||||
class="{% if current_user.objectid == user['_id'] %}self{% endif %}")
|
||||
.sharing-users-avatar
|
||||
img(src="{{ user['avatar'] }}")
|
||||
.sharing-users-details
|
||||
span.sharing-users-name
|
||||
| {{user['full_name']}}
|
||||
| {% if project.user == user['_id'] and current_user.objectid == user['_id'] %}
|
||||
small (You, owner)
|
||||
| {% elif project.user == user['_id'] %}
|
||||
small (Owner)
|
||||
| {% elif current_user.objectid == user['_id'] %}
|
||||
small (You)
|
||||
| {% endif %}
|
||||
span.sharing-users-extra {{user['username']}}
|
||||
.sharing-users-action
|
||||
| {# Only allow deletion if we are: admin, project owners, or current_user in the team #}
|
||||
| {% if current_user.has_cap('admin') or (project.user == current_user.objectid) or (current_user.objectid == user['_id']) %}
|
||||
|
||||
| {% if project.user == user['_id'] %}
|
||||
span
|
||||
i.pi-happy(title="Hi boss!")
|
||||
| {% elif current_user.objectid == user['_id'] %}
|
||||
button.user-remove(title="Leave this project") Leave
|
||||
| {% else %}
|
||||
button.user-remove(title="Remove this user from your project")
|
||||
i.pi-trash
|
||||
| {% endif %}
|
||||
|
||||
| {% endif %}
|
||||
| {% endfor %}
|
||||
|
||||
.col-md-6
|
||||
.sharing-users-info
|
||||
h4 What can team members do?
|
||||
p.
|
||||
Team members are able to upload new content to the project,
|
||||
as well as view, edit, delete, and comment on the content
|
||||
previously created.
|
||||
.border-left.pl-3.mt-4
|
||||
h6 What can team members do?
|
||||
p
|
||||
Team members are able to upload new content to the project,
|
||||
as well as view, edit, delete, and comment on the content
|
||||
previously created.
|
||||
|
||||
| {% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user