You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2022/10/27 17:20:02 UTC
[airavata-django-portal] branch develop updated: AIRAVATA-3642 Improve navigation between Extended User Profile fields editor and Manage Users
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new 69f0e5eb AIRAVATA-3642 Improve navigation between Extended User Profile fields editor and Manage Users
69f0e5eb is described below
commit 69f0e5eb48ca5e50a111aeff2526c669aa75cec7
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Oct 27 13:19:52 2022 -0400
AIRAVATA-3642 Improve navigation between Extended User Profile fields editor and Manage Users
---
.../users/ExtendedUserProfileContainer.vue | 35 ++++++++++++++--------
.../components/users/ExtendedUserProfilePanel.vue | 14 ++++++++-
django_airavata/static/common/scss/main.scss | 5 ++++
3 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfileContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfileContainer.vue
index 8a38d1bd..1948a0dc 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfileContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfileContainer.vue
@@ -26,21 +26,30 @@
</transition-group>
<div ref="bottom" />
<div class="fixed-footer">
- <b-dropdown text="Add Field">
- <b-dropdown-item @click="addField('text')">Text</b-dropdown-item>
- <b-dropdown-item @click="addField('single_choice')"
- >Single Choice</b-dropdown-item
+ <div class="d-flex">
+ <b-dropdown text="Add Field">
+ <b-dropdown-item @click="addField('text')">Text</b-dropdown-item>
+ <b-dropdown-item @click="addField('single_choice')"
+ >Single Choice</b-dropdown-item
+ >
+ <b-dropdown-item @click="addField('multi_choice')"
+ >Multi Choice</b-dropdown-item
+ >
+ <b-dropdown-item @click="addField('user_agreement')"
+ >User Agreement</b-dropdown-item
+ >
+ </b-dropdown>
+ <b-button
+ variant="primary"
+ @click="save"
+ :disabled="!valid"
+ class="ml-2"
+ >Save</b-button
>
- <b-dropdown-item @click="addField('multi_choice')"
- >Multi Choice</b-dropdown-item
+ <b-button variant="secondary" class="ml-auto" href="/admin/users"
+ >Return to Manage Users</b-button
>
- <b-dropdown-item @click="addField('user_agreement')"
- >User Agreement</b-dropdown-item
- >
- </b-dropdown>
- <b-button variant="primary" @click="save" :disabled="!valid" class="ml-2"
- >Save</b-button
- >
+ </div>
</div>
</div>
</template>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfilePanel.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfilePanel.vue
index c3e376c1..6ee8234e 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfilePanel.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ExtendedUserProfilePanel.vue
@@ -1,6 +1,12 @@
<template>
<b-card header="Extended User Profile">
- <b-table :items="items" :fields="fields" small borderless>
+ <template v-if="items.length === 0">
+ <b-link href="/admin/extended-user-profile"
+ >Add additional user profile fields for gateway users to
+ complete</b-link
+ >
+ </template>
+ <b-table v-else :items="items" :fields="fields" small borderless>
<template #cell(value)="{ value, item }">
<!-- only show a valid checkmark when there is a user provided value -->
<i v-if="value && item.valid" class="fas fa-check text-success"></i>
@@ -15,6 +21,12 @@
<template v-else> {{ value }} </template>
</template>
</b-table>
+ <b-link
+ v-if="items.length > 0"
+ href="/admin/extended-user-profile"
+ class="text-muted small"
+ >Add or edit these field definitions</b-link
+ >
</b-card>
</template>
diff --git a/django_airavata/static/common/scss/main.scss b/django_airavata/static/common/scss/main.scss
index 3314aa3b..57728a30 100644
--- a/django_airavata/static/common/scss/main.scss
+++ b/django_airavata/static/common/scss/main.scss
@@ -364,6 +364,11 @@ $header_height_with_border: $header_height + 1px;
z-index: 3;
padding-left: calc(1rem + 15px);
padding-right: calc(1rem + 15px);
+ // Align the right side with the right side of .main-content when wider than 1200px
+ padding-right: max(
+ calc(100% - 1200px - 70px + 1rem + 15px),
+ calc(1rem + 15px)
+ );
padding-top: 1rem;
padding-bottom: 1rem;
background-color: #f7f7f7;