Skip to content

Commit

Permalink
SAK-46660 dicussionswc Hide site title when in the course dashboard (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored Sep 11, 2024
1 parent 3f9216e commit d03e033
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class SakaiForums extends SakaiPageableElement {

async loadAllData() {

this.messagesClass = "three-col";
this.messagesClass = !this.siteId ? "three-col" : "two-col";

const url = this.siteId ? `/api/sites/${this.siteId}/forums/summary` : `/api/users/${this.userId}/forums/summary`;
return fetch(url)
Expand Down Expand Up @@ -146,6 +146,7 @@ export class SakaiForums extends SakaiPageableElement {
${this._i18n.syn_discussion_heading}
</a>
</div>
${!this.siteId ? html`
<div class="header">
<a href="javascript:;"
@click=${this.sortBySite}
Expand All @@ -154,10 +155,13 @@ export class SakaiForums extends SakaiPageableElement {
${this._i18n.syn_site_heading}
</a>
</div>
` : nothing}
${this.dataPage.map((m, i) => html`
<div class="cell ${i % 2 === 0 ? "even" : "odd"}"><a href="${m.messageUrl}">${m.messageCount}</a></div>
<div class="cell ${i % 2 === 0 ? "even" : "odd"}"><a href="${m.forumUrl}">${m.forumCount}</a></div>
${!this.siteId ? html`
<div class="cell ${i % 2 === 0 ? "even" : "odd"}"><a href="${m.siteUrl}">${m.siteTitle}</a></div>
` : nothing}
`)}
</div>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ export class SakaiTasks extends SakaiPageableElement {
</div>
</div>
<div class="task-block cell ${i % 2 === 0 ? "even" : "odd"}">
${!this.siteId ? html`
<div class="site-title">${t.siteTitle}</div>
` : nothing}
<div class="description">${t.description}</div>
<div class="due-date"><span class="due">${this.i18n.due} </span>${t.dueHuman}</div>
${t.notes ? html`
Expand Down

0 comments on commit d03e033

Please sign in to comment.