Skip to content

Commit

Permalink
small linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen-Wittingen committed Sep 9, 2023
1 parent a3736ba commit 9faf396
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions app/abilities/room-advert.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default class RoomAdvert extends Ability {
);
}

isRoomAdvertOwner(room_advert) {
isRoomAdvertOwner(roomAdvert) {
const { currentUser } = this.session;
return !isNone(currentUser) && room_advert.isOwner(currentUser);
return !isNone(currentUser) && roomAdvert.isOwner(currentUser);
}
}
28 changes: 14 additions & 14 deletions app/components/cards/public-room-advert-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
<td>{{roomAdvert.availableFrom}}</td>
</tr>
{{/if}}
<tr>
<th class="pe-3 text-secondary">{{t 'component.public.roomForum.contact'}}</th>
<td>
{{#if (is-phone roomAdvert.contact)}}
<a href='tel:{{roomAdvert.contact}}'>{{roomAdvert.contact}}</a>
{{else if (is-email roomAdvert.contact)}}
<a href='mailto:{{roomAdvert.contact}}'>{{roomAdvert.contact}}</a>
{{else if (is-url roomAdvert.contact)}}
<a href='{{roomAdvert.contact}}' target='_blank'>{{roomAdvert.contact}}</a>
{{else}}
{{roomAdvert.contact}}
{{/if}}
</td>
</tr>
<tr>
<th class="pe-3 text-secondary">{{t 'component.public.roomForum.contact'}}</th>
<td>
{{#if (is-phone roomAdvert.contact)}}
<a href='tel:{{roomAdvert.contact}}'>{{roomAdvert.contact}}</a>
{{else if (is-email roomAdvert.contact)}}
<a href='mailto:{{roomAdvert.contact}}'>{{roomAdvert.contact}}</a>
{{else if (is-url roomAdvert.contact)}}
<a href='{{roomAdvert.contact}}' target='_blank'>{{roomAdvert.contact}}</a>
{{else}}
{{roomAdvert.contact}}
{{/if}}
</td>
</tr>
</table>
</div>
{{#if roomAdvert.coverPhotoUrl}}
Expand Down
10 changes: 5 additions & 5 deletions app/components/header-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export default Component.extend({
staticPages: tracked(),

onAboutUsPage: computed('router.{currentRouteName,currentURL}', function () {
return (this.router.currentRouteName === 'public.room-forum') ||
(
this.router.currentRouteName === 'static-pages.static-page.index' &&
this.router.currentURL !== '/static-pages/word-lid' &&
this.router.currentURL !== '/static-pages/sponsoring'
return (
this.router.currentRouteName === 'public.room-forum' ||
(this.router.currentRouteName === 'static-pages.static-page.index' &&
this.router.currentURL !== '/static-pages/word-lid' &&
this.router.currentURL !== '/static-pages/sponsoring')
);
}),

Expand Down
2 changes: 1 addition & 1 deletion app/components/menu-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
</div>
<div class='static-pages-menu ms-2'>
{{#each-in staticPages as |id title|}}
<MenuSidebarItem
<MenuSidebarItem
@link='static-pages.static-page'
@linkArgument={{id}}
@hasPermission={{can 'show static-pages'}}
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/room-adverts/room-advert/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class RoomAdvertEditController extends EditController {

@action
coverPhotoLoaded(file) {
const room_advert = this.model;
room_advert.set('coverPhoto', file.data);
const roomAdvert = this.model;
roomAdvert.set('coverPhoto', file.data);
}
}
2 changes: 1 addition & 1 deletion app/routes/public/room-forum.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export default class RoomAdvertsRoute extends ApplicationRoute {
params.perPage = 5;
return this.store.queryPaged('room-advert', params);
}
}
}
10 changes: 5 additions & 5 deletions app/routes/room-adverts/room-advert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application';

export default class RoomAdvertIndexRoute extends AuthenticatedRoute {
get pageActions() {
const room_advert = this.controller.model;
const roomAdvert = this.controller.model;
return [
{
link: 'room-adverts.room-advert.edit',
title: 'Wijzigen',
icon: 'pencil',
linkArgument: room_advert,
canAccess: this.abilities.can('edit room-advert', room_advert),
linkArgument: roomAdvert,
canAccess: this.abilities.can('edit room-advert', roomAdvert),
},
{
link: 'room-adverts.room-advert.destroy',
title: 'Verwijderen',
icon: 'trash',
linkArgument: room_advert,
canAccess: this.abilities.can('destroy room-adverts', room_advert),
linkArgument: roomAdvert,
canAccess: this.abilities.can('destroy room-adverts', roomAdvert),
},
];
}
Expand Down
10 changes: 5 additions & 5 deletions app/templates/public/room-forum.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</div>
{{/if}}

{{#if (gt model.meta.page_count 1)}}
<div class='row justify-content-center'>
<PageNumbers @info={{model.meta}} />
</div>
{{/if}}
{{#if (gt model.meta.page_count 1)}}
<div class='row justify-content-center'>
<PageNumbers @info={{model.meta}} />
</div>
{{/if}}
</div>
54 changes: 27 additions & 27 deletions app/templates/room-adverts/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
<div class='row'>
{{#each model as |roomAdvert|}}
<div class='d-flex col-md-6 mb-3'>
<div class='d-flex'>
<div class='card mb-0'>
<LinkTo @route='room-adverts.room-advert' @model={{roomAdvert.id}}>
<div class='card-header card-header--overlay'>
<img
itemprop='image'
class='card-img-top'
src={{roomAdvert.coverPhotoUrlOrDefault}}
/>
<div class='d-flex'>
<div class='card mb-0'>
<LinkTo @route='room-adverts.room-advert' @model={{roomAdvert.id}}>
<div class='card-header card-header--overlay'>
<img
itemprop='image'
class='card-img-top'
src={{roomAdvert.coverPhotoUrlOrDefault}}
/>

<div class='card-title-bar gradient-overlay without-subtitle'>
<div class='card-titles'>
<LinkTo @route='room-adverts.room-advert' @model={{roomAdvert.id}}>
<h2 class='card-title' itemprop='name headline'>
{{roomAdvert.houseName}}
</h2>
</LinkTo>
</div>
<div class='card-title-bar gradient-overlay without-subtitle'>
<div class='card-titles'>
<LinkTo @route='room-adverts.room-advert' @model={{roomAdvert.id}}>
<h2 class='card-title' itemprop='name headline'>
{{roomAdvert.houseName}}
</h2>
</LinkTo>
</div>
</div>
</LinkTo>
</div>
</LinkTo>

<div class='card-body'>
<div class='card-body'>
<div class='card-text pb-2 h-100 d-flex flex-column' itemprop='roomAdvertBody'>
{{! Table without style }}
<table class='mb-4'>
Expand All @@ -52,17 +52,17 @@
{{/if}}
</table>
<div class="flex-grow-1" />
<LinkTo
@route='room-adverts.room-advert'
@model={{roomAdvert.id}}
itemprop='url'
>
<i>{{t 'tag.button.readMore'}}</i>
</LinkTo>
</div>
<LinkTo
@route='room-adverts.room-advert'
@model={{roomAdvert.id}}
itemprop='url'
>
<i>{{t 'tag.button.readMore'}}</i>
</LinkTo>
</div>
</div>
</div>
</div>
</div>
{{/each}}

Expand Down

0 comments on commit 9faf396

Please sign in to comment.