Skip to content

Commit

Permalink
Merge pull request #434 from uw-it-aca/char/topbar
Browse files Browse the repository at this point in the history
Char/topbar
  • Loading branch information
charlon authored Jul 25, 2024
2 parents 3cd8ee7 + 968a6a2 commit 7922e98
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
33 changes: 12 additions & 21 deletions course_grader_vue/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<!-- layout.vue: this is where you override the layout -->
<axdd-sidebar
<!-- layout.vue: this is where you override the layout -->
<axdd-topbar
:app-name="appName"
:app-root-url="appRootUrl"
:page-title="pageTitle"
Expand All @@ -25,27 +25,18 @@
<a :href="signOutUrl" class="text-white">Sign out</a>
</axdd-profile>
</template>
<template #navigation>
<ul class="text-white">
<li>Summer 2024</li>
<li>Spring 2024</li>
<li>Winter 2024</li>
<li>Autumn 2023</li>
<li>Summer 2023</li>
</ul>
</template>
<template #aside>
asfdasfdasfd
</template>
<template #main>
<slot name="title">
<h1 class="">{{ pageTitle }}</h1>
</slot>
<slot name="content"></slot>
<div class="row justify-content-center">
<div class="col-9 my-5">
<slot name="title">
<h1 class="">{{ pageTitle }}</h1>
</slot>
<slot name="content"></slot>
</div>
</div>
</template>
<template #footer></template>
</axdd-sidebar>

</axdd-topbar>
</template>

<script>
Expand All @@ -70,7 +61,7 @@ export default {
},
data() {
let context = this.contextStore.context,
appName = "Gradepage";
appName = "Gradepage";
return {
appName: appName,
appRootUrl: "/",
Expand Down
23 changes: 15 additions & 8 deletions course_grader_vue/pages/term.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<template>
<layout :page-title="pageTitle">
<template #content>
<div class="border">
<div v-if="sections.length > 0">
<section-list :sections="sections"></section-list>
</div>
<div v-else>
You do not have any classes to grade for <strong>{{ pageTitle }}</strong>. If you believe this to be incorrect, please contact your department's Time Schedule Coordinator.
You do not have any classes to grade for <strong>{{ pageTitle }}</strong
>. If you believe this to be incorrect, please contact your department's
Time Schedule Coordinator.
</div>
</div>
</template>
</layout>
</template>
Expand Down Expand Up @@ -40,8 +44,9 @@ export default {
updateTerm: function () {
let term;
if (this.$route.params.id) {
term = this.contextStore.context.terms.find(
t => t.sections_url.endsWith(this.$route.params.id));
term = this.contextStore.context.terms.find((t) =>
t.sections_url.endsWith(this.$route.params.id)
);
if (term) {
this.pageTitle = term.quarter + " " + term.year;
this.sectionsURL = term.sections_url;
Expand All @@ -52,11 +57,13 @@ export default {
}
},
loadSectionsForTerm: function () {
this.getSections(this.sectionsURL).then(response => {
return response.data;
}).then(data => {
this.sections = data.sections;
})
this.getSections(this.sectionsURL)
.then((response) => {
return response.data;
})
.then((data) => {
this.sections = data.sections;
});
},
},
created() {
Expand Down

0 comments on commit 7922e98

Please # to comment.