Skip to content

Commit

Permalink
Add content to SOG page (#878)
Browse files Browse the repository at this point in the history
* Add content to SOG page

* Lint
  • Loading branch information
wilco375 authored Oct 11, 2024
1 parent 0a74842 commit 841c4fe
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 2 deletions.
13 changes: 11 additions & 2 deletions app/routes/sog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ export default class SogIndexRoute extends ApplicationRoute {
return this.abilities.can('show sog');
}

model() {
return [];
async model() {
/* eslint-disable camelcase */
let photoAlbumsWithoutTags = await this.store.query('photo-album', {
sort: '-date',
filter: { without_photo_tags: true },
page: { number: '1', size: 4 },
});
/* eslint-enable camelcase */
return {
photoAlbumsWithoutTags,
};
}
}
1 change: 1 addition & 0 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import 'components/flash-notice';
@import 'components/forum/forum-post';
@import 'components/footer';
@import 'components/list-group';
@import 'components/md-editor';
@import 'components/menu-sidebar';
@import 'components/navbar';
Expand Down
8 changes: 8 additions & 0 deletions app/styles/components/list-group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.list-group-item:not(:first-child), a:not(:first-child) > .list-group-item {
border-top: 0;
}

.list-group-flush .list-group-item {
border-right: 0;
border-left: 0;
}
59 changes: 59 additions & 0 deletions app/templates/sog/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,63 @@
</LinkTo>
</div>
</div>
{{/if}}

{{#if (can 'create photo-tag')}}
<div class='card'>
<div class='card-body'>
<h2 class='card-title'>Foto's taggen</h2>
<p class='card-text'>
Help jij mee om &aacute;lle foto's te taggen? Zoek een album of foto op zonder tags en tag wie er op de foto staan! Je kan ook een van de onderstaande albums bekijken, deze albums hebben momenteel geen enkele foto met tags.
</p>
</div>
<ul class='list-group list-group-flush mt-2'>
{{#each this.model.photoAlbumsWithoutTags as |album|}}
<LinkTo @route='photo-albums.photo-album' @model={{album.id}}>
<li class='list-group-item'>{{album.title}}</li>
</LinkTo>
{{else}}
<li class='list-group-item'>
<i>Alle albums bevatten al foto's met tags. Bekijk zelf of er nog foto's zijn in albums die nog tags missen!</i>
</li>
{{/each}}
</ul>
<div class='card-footer text-end'>
<LinkTo @route='photo-albums.index' class='btn btn-primary'>
Begin met taggen!
</LinkTo>
</div>
</div>
{{/if}}

{{#if (can 'show books')}}
<div class='card'>
<div class='card-body'>
<h2 class='card-title'>Leen een boek</h2>
<p class='card-text'>
Geen zin in je studie maar wil je toch wat nuttigs doen? Leen een boek uit de bibliotheek in de bestuurskamer!
</p>
</div>
<div class='card-footer text-end'>
<LinkTo @route='books.index' class='btn btn-primary'>
Bekijk alle boeken!
</LinkTo>
</div>
</div>
{{/if}}

{{#if (can 'show forum/categories')}}
<div class='card'>
<div class='card-body'>
<h2 class='card-title'>Lees of schrijf op het forum</h2>
<p class='card-text'>
Neem deel aan het juffen op het forum, bekijk wat uw medeleden gezegd hebben op het grote quote topic, of start uw eigen topic!
</p>
</div>
<div class='card-footer text-end'>
<LinkTo @route='forum.categories' class='btn btn-primary'>
Bekijk het forum!
</LinkTo>
</div>
</div>
{{/if}}

0 comments on commit 841c4fe

Please sign in to comment.