airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 08/10: AIRAVATA-2711 Sorting members, UI clean up
Date Thu, 15 Nov 2018 16:13:21 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit a1607ec61d0c41fc026cbd3fe126c5c086c7d1b7
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Thu Nov 15 09:56:52 2018 -0500

    AIRAVATA-2711 Sorting members, UI clean up
---
 .../js/group_components/GroupEditor.vue                   |  6 ++++--
 .../js/group_components/GroupMembersEditor.vue            | 15 ++++++++-------
 .../static/common/js/components/AutocompleteTextInput.vue |  6 +++++-
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupEditor.vue
b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupEditor.vue
index 9305101..0e28ded 100644
--- a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupEditor.vue
+++ b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupEditor.vue
@@ -16,8 +16,10 @@
         </b-form-textarea>
       </b-form-group>
 
-      <group-members-editor :members="localGroup.members" :admins="localGroup.admins"
@add-member="addGroupMember"
-        @remove-member="removeGroupMember" @change-role-to-member="changeRoleToMember" @change-role-to-admin="changeRoleToAdmin"
/>
+      <b-card title="Group Members" title-tag="h5">
+        <group-members-editor :members="localGroup.members" :admins="localGroup.admins"
@add-member="addGroupMember"
+          @remove-member="removeGroupMember" @change-role-to-member="changeRoleToMember"
@change-role-to-admin="changeRoleToAdmin" />
+      </b-card>
 
       <b-button @click="submitForm" variant="primary">Submit</b-button>
     </b-form>
diff --git a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupMembersEditor.vue
b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupMembersEditor.vue
index d20c6d4..5e8e1e5 100644
--- a/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupMembersEditor.vue
+++ b/django_airavata/apps/groups/static/django_airavata_groups/js/group_components/GroupMembersEditor.vue
@@ -1,9 +1,10 @@
 <template>
   <div>
-    <b-form-group label="Add members" labelFor="user-autocomplete">
-      <autocomplete-text-input id="user-autocomplete" :suggestions="suggestions" @selected="suggestionSelected"
/>
+    <b-form-group>
+      <autocomplete-text-input id="user-autocomplete" :suggestions="suggestions" @selected="suggestionSelected"
+        placeholder="Search for users to add to this group" />
     </b-form-group>
-    <b-table v-if="membersCount > 0" hover :items="currentMembers" :fields="fields">
+    <b-table v-if="membersCount > 0" hover :items="currentMembers" :fields="fields"
sort-by="name">
       <template slot="role" slot-scope="data">
         <b-form-select :value="data.item.role" @input="changeRole(data.item, $event)"
:options="groupRoleOptions">
         </b-form-select>
@@ -62,10 +63,10 @@ export default {
     },
     fields() {
       return [
-        { key: "name", label: "Name" },
-        { key: "username", label: "Username" },
-        { key: "email", label: "Email" },
-        { key: "role", label: "Role" },
+        { key: "name", label: "Name", sortable: true },
+        { key: "username", label: "Username", sortable: true },
+        { key: "email", label: "Email", sortable: true },
+        { key: "role", label: "Role", sortable: true },
         { key: "remove", label: "Remove" }
       ];
     },
diff --git a/django_airavata/static/common/js/components/AutocompleteTextInput.vue b/django_airavata/static/common/js/components/AutocompleteTextInput.vue
index 709c640..511232b 100644
--- a/django_airavata/static/common/js/components/AutocompleteTextInput.vue
+++ b/django_airavata/static/common/js/components/AutocompleteTextInput.vue
@@ -4,7 +4,7 @@
       <b-input-group-text slot="prepend">
         <i class="fa fa-search"></i>
       </b-input-group-text>
-      <b-form-input type="text" :value="searchValue" placeholder="Type to get suggestions..."
@input="updateSearchValue" @keydown.native.enter='enter'
+      <b-form-input type="text" :value="searchValue" :placeholder="placeholder" @input="updateSearchValue"
@keydown.native.enter='enter'
         @keydown.native.down='down' @keydown.native.up='up'></b-form-input>
     </b-input-group>
     <b-list-group class="autocomplete-suggestion-list" v-if="open">
@@ -25,6 +25,10 @@ export default {
     suggestions: {
       type: Array,
       required: true
+    },
+    placeholder: {
+      type: String,
+      default: "Type to get suggestions..."
     }
   },
   data() {


Mime
View raw message