-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17487 from guerler/grid_tabs
Consolidate resource grids into tab views
- Loading branch information
Showing
36 changed files
with
791 additions
and
1,206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<script setup lang="ts"> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faPlus } from "@fortawesome/free-solid-svg-icons"; | ||
import { BNav, BNavItem } from "bootstrap-vue"; | ||
import historiesGridConfig from "@/components/Grid/configs/histories"; | ||
import historiesPublishedGridConfig from "@/components/Grid/configs/historiesPublished"; | ||
import historiesSharedGridConfig from "@/components/Grid/configs/historiesShared"; | ||
import { useUserStore } from "@/stores/userStore"; | ||
import Heading from "@/components/Common/Heading.vue"; | ||
import LoginRequired from "@/components/Common/LoginRequired.vue"; | ||
import GridList from "@/components/Grid/GridList.vue"; | ||
const userStore = useUserStore(); | ||
library.add(faPlus); | ||
interface Props { | ||
activeList?: "my" | "shared" | "published"; | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
activeList: "my", | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div class="d-flex flex-column"> | ||
<div class="d-flex"> | ||
<Heading h1 separator inline size="xl" class="flex-grow-1 mb-2">Histories</Heading> | ||
<div v-if="!userStore.isAnonymous"> | ||
<BButton | ||
size="sm" | ||
variant="outline-primary" | ||
to="/histories/import" | ||
data-description="grid action import new history"> | ||
<Icon :icon="faPlus" /> | ||
<span v-localize>Import History</span> | ||
</BButton> | ||
</div> | ||
</div> | ||
<BNav pills justified class="mb-2"> | ||
<BNavItem | ||
id="histories-my-tab" | ||
:active="activeList === 'my'" | ||
:disabled="userStore.isAnonymous" | ||
to="/histories/list"> | ||
My Histories | ||
<LoginRequired v-if="userStore.isAnonymous" target="histories-my-tab" title="Manage your Histories" /> | ||
</BNavItem> | ||
<BNavItem | ||
id="histories-shared-tab" | ||
:active="activeList === 'shared'" | ||
:disabled="userStore.isAnonymous" | ||
to="/histories/list_shared"> | ||
Shared with Me | ||
<LoginRequired | ||
v-if="userStore.isAnonymous" | ||
target="histories-shared-tab" | ||
title="Manage your Histories" /> | ||
</BNavItem> | ||
<BNavItem id="histories-published-tab" :active="activeList === 'published'" to="/histories/list_published"> | ||
Public Histories | ||
</BNavItem> | ||
</BNav> | ||
<GridList v-if="activeList === 'my'" :grid-config="historiesGridConfig" embedded /> | ||
<GridList v-else-if="activeList === 'shared'" :grid-config="historiesSharedGridConfig" embedded /> | ||
<GridList v-else :grid-config="historiesPublishedGridConfig" embedded /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<script setup lang="ts"> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faPlus } from "@fortawesome/free-solid-svg-icons"; | ||
import { BNav, BNavItem } from "bootstrap-vue"; | ||
import pagesGridConfig from "@/components/Grid/configs/pages"; | ||
import pagesPublishedGridConfig from "@/components/Grid/configs/pagesPublished"; | ||
import { useUserStore } from "@/stores/userStore"; | ||
import Heading from "@/components/Common/Heading.vue"; | ||
import LoginRequired from "@/components/Common/LoginRequired.vue"; | ||
import GridList from "@/components/Grid/GridList.vue"; | ||
const userStore = useUserStore(); | ||
library.add(faPlus); | ||
interface Props { | ||
activeList?: "my" | "published"; | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
activeList: "my", | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div class="d-flex flex-column"> | ||
<div class="d-flex"> | ||
<Heading h1 separator inline size="xl" class="flex-grow-1 mb-2">Pages</Heading> | ||
<div v-if="!userStore.isAnonymous"> | ||
<BButton id="page-create" size="sm" variant="outline-primary" to="/pages/create"> | ||
<Icon :icon="faPlus" /> | ||
<span v-localize>Create Page</span> | ||
</BButton> | ||
</div> | ||
</div> | ||
<BNav pills justified class="mb-2"> | ||
<BNavItem | ||
id="pages-my-tab" | ||
:active="activeList === 'my'" | ||
:disabled="userStore.isAnonymous" | ||
to="/pages/list"> | ||
My Pages | ||
<LoginRequired v-if="userStore.isAnonymous" target="pages-my-tab" title="Manage your Pages" /> | ||
</BNavItem> | ||
<BNavItem :active="activeList === 'published'" to="/pages/list_published"> Public Pages </BNavItem> | ||
</BNav> | ||
<GridList v-if="activeList === 'my'" :grid-config="pagesGridConfig" embedded /> | ||
<GridList v-else :grid-config="pagesPublishedGridConfig" embedded /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<script setup lang="ts"> | ||
import { library } from "@fortawesome/fontawesome-svg-core"; | ||
import { faPlus } from "@fortawesome/free-solid-svg-icons"; | ||
import { BNav, BNavItem } from "bootstrap-vue"; | ||
import visualizationsGridConfig from "@/components/Grid/configs/visualizations"; | ||
import visualizationsPublishedGridConfig from "@/components/Grid/configs/visualizationsPublished"; | ||
import { useUserStore } from "@/stores/userStore"; | ||
import Heading from "@/components/Common/Heading.vue"; | ||
import LoginRequired from "@/components/Common/LoginRequired.vue"; | ||
import GridList from "@/components/Grid/GridList.vue"; | ||
const userStore = useUserStore(); | ||
library.add(faPlus); | ||
interface Props { | ||
activeList?: "my" | "published"; | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
activeList: "my", | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div class="d-flex flex-column"> | ||
<div class="d-flex"> | ||
<Heading h1 separator inline size="xl" class="flex-grow-1 mb-2">Visualizations</Heading> | ||
<div v-if="!userStore.isAnonymous"> | ||
<BButton size="sm" variant="outline-primary" to="/visualizations"> | ||
<Icon :icon="faPlus" /> | ||
<span v-localize>Create Visualization</span> | ||
</BButton> | ||
</div> | ||
</div> | ||
<BNav pills justified class="mb-2"> | ||
<BNavItem | ||
id="visualizations-my-tab" | ||
:active="activeList === 'my'" | ||
:disabled="userStore.isAnonymous" | ||
to="/visualizations/list"> | ||
My Visualizations | ||
<LoginRequired | ||
v-if="userStore.isAnonymous" | ||
target="visualizations-my-tab" | ||
title="Manage your Visualizations" /> | ||
</BNavItem> | ||
<BNavItem :active="activeList === 'published'" to="/visualizations/list_published"> | ||
Public Visualizations | ||
</BNavItem> | ||
</BNav> | ||
<GridList v-if="activeList === 'my'" :grid-config="visualizationsGridConfig" embedded /> | ||
<GridList v-else :grid-config="visualizationsPublishedGridConfig" embedded /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.