Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions kolibri/plugins/facility/assets/src/views/FacilityAppBarPage.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>

<AppBarPage :title="title">
<AppBarPage
:title="title"
:appearanceOverrides="appearanceOverrides"
>
<template #default="{ pageContentHeight }">
<div style="max-width: 1000px; margin: 0 auto">
<slot :pageContentHeight="pageContentHeight"></slot>
</div>
<slot :pageContentHeight="pageContentHeight"></slot>
</template>
</AppBarPage>

Expand All @@ -30,6 +31,11 @@
type: String,
default: null,
},
appearanceOverrides: {
type: Object,
required: false,
default: null,
},
Comment on lines +34 to +38
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably do this in all of our *AppBarPage components and establish it as a convention for page-specific styling for each plugin.

},
computed: {
/* Returns the given appBarTitle prop if given, otherwise will return
Expand Down
30 changes: 20 additions & 10 deletions kolibri/plugins/facility/assets/src/views/users/NewUsersPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
<template #default="{ pageContentHeight }">
<KPageContainer
class="page-container"
:style="{ maxHeight: pageContentHeight + 24 + 'px' }"
:style="{ maxHeight: pageContentHeight + 24 + 'px', padding: '2em 2em 1em' }"
>
<p>
<KRouterLink
:to="$store.getters.facilityPageLinks.UserPage"
icon="back"
:text="backToUsers$()"
/>
</p>
<KRouterLink
:to="$store.getters.facilityPageLinks.UserPage"
icon="back"
:text="backToUsers$()"
/>
<div class="new-users-page-header">
<h1>{{ newUsers$() }}</h1>
<div>
Expand Down Expand Up @@ -331,18 +329,23 @@
<style lang="scss" scoped>

.page-container {
position: relative;
display: flex;
flex-direction: column;
max-width: 1000px;
margin: 24px auto;
margin: 0 auto auto;
}

.new-users-page-header {
display: flex;
gap: 16px;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
margin: 1em 0 1.5em;

h1 {
margin: 0;
}
}

.empty-new-users {
Expand Down Expand Up @@ -374,4 +377,11 @@
}
}

/deep/ .main-wrapper {
// The default padding causes root scroll which defeats
// the purpose of our maxHeight style on the KPageContainer.
// Uses !important because the overridden style is inline
padding-bottom: 0 !important;
}

</style>
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<template>

<FacilityAppBarPage>
<FacilityAppBarPage
class="wrapper"
:appearanceOverrides="{
maxWidth: '1440px',
margin: '0 auto',
padding: '2em',
}"
>
<template #default="{ pageContentHeight }">
<!-- Adding 24 pixels to the max height to prevent having too much bottom padding space -->
<KPageContainer
class="flex-column"
:style="{ maxHeight: pageContentHeight + 24 + 'px' }"
:style="{ maxHeight: pageContentHeight - 48 + 'px', padding: '2em 2em 1em' }"
>
<p>
<KRouterLink
v-if="userIsMultiFacilityAdmin"
:to="{
name: $store.getters.facilityPageLinks.AllFacilitiesPage.name,
params: { subtopicName: 'UserPage' },
}"
icon="back"
:text="coreString('changeLearningFacility')"
/>
</p>
<KRouterLink
v-if="userIsMultiFacilityAdmin"
:to="{
name: $store.getters.facilityPageLinks.AllFacilitiesPage.name,
params: { subtopicName: 'UserPage' },
}"
icon="back"
:text="coreString('changeLearningFacility')"
/>
<div class="users-page-header">
<h1>{{ coreString('usersLabel') }}</h1>
<div class="users-page-header-actions">
Expand Down Expand Up @@ -335,10 +340,10 @@
gap: 16px;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
margin-bottom: 1.5em;

h1 {
margin: 16px 0;
margin: 0;
}

.users-page-header-actions {
Expand All @@ -355,4 +360,11 @@
flex-direction: column;
}

/deep/ .main-wrapper {
// The default padding causes root scroll which defeats
// the purpose of our maxHeight style on the KPageContainer.
// Uses !important because the overridden style is inline
padding-bottom: 0 !important;
}

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@

.move-down {
position: relative;
margin-top: 24px;
}

.role-badge {
Expand All @@ -731,6 +730,8 @@
.search-filter-section {
display: flex;
justify-content: start;
// Ensure space enough for keyboard nav outline before table content
padding-bottom: 0.5em;
}

.user-type-icon {
Expand All @@ -742,7 +743,7 @@
}

.filter-button {
padding-top: 8px;
padding-top: 10px;
margin-left: 1em;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
<style lang="scss" scoped>

.pagination-nav {
margin-bottom: 8px;
/* Ensure space for pagination buttons on touch devices */
margin-top: 1em;
text-align: right;
}

Expand Down
Loading