Skip to content

Commit

Permalink
Merge pull request #1865 from c2corg/feed-and-outing-cards-soft-mobil…
Browse files Browse the repository at this point in the history
…ity-icon

Add soft mobility icon to (feed) outing cards
  • Loading branch information
brunobesson authored Apr 29, 2021
2 parents 3378769 + 9b6cd8b commit 0abaec7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/components/cards/FeedCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@

<card-row>
<document-title :document="item.document" class="has-text-weight-bold" />
<span v-if="documentType == 'outing'" class="is-nowrap has-left-margin-mobile">{{ dates }}</span>
<span v-if="documentType === 'outing'" class="is-nowrap has-left-margin-mobile">{{ dates }}</span>
</card-row>

<card-row v-if="locale && locale.summary">
<p class="is-max-3-lines-height">{{ locale.summary | stripMarkdown | max300chars }}</p>
</card-row>

<card-row v-if="images.length != 0">
<card-row v-if="images.length">
<gallery :images="images" />
</card-row>

<card-row v-if="documentType != 'article' && documentType != 'book'">
<span v-if="documentType == 'outing' || documentType == 'route'">
<span v-if="documentType === 'outing' || documentType === 'route'">
<icon-ratings class="card-icon" />
<document-rating :document="item.document" />
</span>
Expand Down Expand Up @@ -68,13 +68,15 @@
<card-activities-item v-if="item.document.activities" :activities="item.document.activities" />
</span>
<span>
<marker-soft-mobility v-if="documentType === 'outing' && item.document.public_transport" />
&nbsp;
<marker-image-count :image-count="item.document.img_count" />
<span>&nbsp;</span>
&nbsp;
<marker-gps-trace v-if="item.document.geometry && item.document.geometry.has_geom_detail" />
</span>
<span> {{ $dateUtils.timeAgo(item.time) }} </span>
<span>
<marker-condition v-if="documentType == 'outing'" :condition="item.document.condition_rating" />
<marker-condition v-if="documentType === 'outing'" :condition="item.document.condition_rating" />
<marker-quality :quality="item.document.quality" />
</span>
</card-row>
Expand Down
4 changes: 3 additions & 1 deletion src/components/cards/OutingCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
<card-activities-item :activities="document.activities" />

<span class="card-icon is-nowrap">
<marker-soft-mobility v-if="document.public_transport" />
&nbsp;
<marker-gps-trace v-if="document.geometry.has_geom_detail" />
<span>&nbsp;</span>
&nbsp;
<marker-image-count :image-count="document.img_count" />
</span>

Expand Down
3 changes: 3 additions & 0 deletions src/components/generics/markers/MarkerSoftMobility.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template>
<fa-icon icon="bus" :title="$gettext('Soft mobility outing')"></fa-icon>
</template>
4 changes: 2 additions & 2 deletions src/js/vue-plugins/font-awesome-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { faBomb } from '@fortawesome/free-solid-svg-icons/faBomb';
import { faBroom } from '@fortawesome/free-solid-svg-icons/faBroom';
import { faBug } from '@fortawesome/free-solid-svg-icons/faBug';
import { faBullseye } from '@fortawesome/free-solid-svg-icons/faBullseye';
import { faBus } from '@fortawesome/free-solid-svg-icons/faBus';
import { faCalendar } from '@fortawesome/free-solid-svg-icons/faCalendar';
import { faCamera } from '@fortawesome/free-solid-svg-icons/faCamera';
import { faChartBar } from '@fortawesome/free-solid-svg-icons/faChartBar';
Expand Down Expand Up @@ -229,12 +230,12 @@ export default function install(Vue) {
faBomb,
faBroom,
faBug,
faBus,
faBullseye,
faCalendar,
faCamera,
faChartBar,
faCheckCircle,
// faCheckSquare,
faChevronLeft,
faChevronRight,
faCircle,
Expand Down Expand Up @@ -305,7 +306,6 @@ export default function install(Vue) {
faThLarge,
faThList,
faTrash,
// faTrashAlt,
faUndoAlt,
faUnlock,
faUpload,
Expand Down

0 comments on commit 0abaec7

Please sign in to comment.