removed use_plural space setting
remove because i dont see the need and it was causing issues
This commit is contained in:
parent
b14d8f0051
commit
f0f12ca83f
@ -36,7 +36,7 @@ def delete_space_action(modeladmin, request, queryset):
|
||||
|
||||
|
||||
class SpaceAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing', 'use_plural')
|
||||
list_display = ('name', 'created_by', 'max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
|
||||
search_fields = ('name', 'created_by__username')
|
||||
list_filter = ('max_recipes', 'max_users', 'max_file_storage_mb', 'allow_sharing')
|
||||
date_hierarchy = 'created_at'
|
||||
|
@ -207,7 +207,7 @@
|
||||
v-if="!import_multiple">
|
||||
|
||||
<recipe-card :recipe="recipe_json" :detailed="false"
|
||||
:show_context_menu="false" :use_plural="use_plural"
|
||||
:show_context_menu="false"
|
||||
></recipe-card>
|
||||
</b-col>
|
||||
<b-col>
|
||||
|
@ -41,7 +41,6 @@
|
||||
<!-- model isn't paginated and loads in one API call -->
|
||||
<div v-if="!paginated">
|
||||
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
||||
:use_plural="use_plural"
|
||||
:model="this_model" @item-action="startAction($event, 'left')"
|
||||
@finish-action="finishAction"/>
|
||||
</div>
|
||||
@ -51,7 +50,6 @@
|
||||
<template v-slot:cards>
|
||||
<generic-horizontal-card v-for="i in items_left" v-bind:key="i.id" :item="i"
|
||||
:model="this_model"
|
||||
:use_plural="use_plural"
|
||||
@item-action="startAction($event, 'left')"
|
||||
@finish-action="finishAction"/>
|
||||
</template>
|
||||
@ -63,7 +61,6 @@
|
||||
<template v-slot:cards>
|
||||
<generic-horizontal-card v-for="i in items_right" v-bind:key="i.id" :item="i"
|
||||
:model="this_model"
|
||||
:use_plural="use_plural"
|
||||
@item-action="startAction($event, 'right')"
|
||||
@finish-action="finishAction"/>
|
||||
</template>
|
||||
|
@ -572,7 +572,7 @@
|
||||
{{ $t("Enable_Amount") }}
|
||||
</button>
|
||||
|
||||
<template v-if="use_plural">
|
||||
|
||||
<button type="button" class="dropdown-item"
|
||||
v-if="!ingredient.always_use_plural_unit"
|
||||
@click="ingredient.always_use_plural_unit = true">
|
||||
@ -600,7 +600,7 @@
|
||||
<i class="fas fa-filter fa-fw"></i>
|
||||
{{ $t("Use_Plural_Food_Simple") }}
|
||||
</button>
|
||||
</template>
|
||||
|
||||
|
||||
<button type="button" class="dropdown-item"
|
||||
@click="copyTemplateReference(index, ingredient)">
|
||||
|
@ -90,7 +90,6 @@
|
||||
:ingredient_factor="ingredient_factor"
|
||||
:servings="servings"
|
||||
:header="true"
|
||||
:use_plural="use_plural"
|
||||
id="ingredient_container"
|
||||
@checked-state-changed="updateIngredientCheckedState"
|
||||
@change-servings="servings = $event"
|
||||
@ -124,7 +123,6 @@
|
||||
:step="s"
|
||||
:ingredient_factor="ingredient_factor"
|
||||
:index="index"
|
||||
:use_plural="use_plural"
|
||||
:start_time="start_time"
|
||||
@update-start-time="updateStartTime"
|
||||
@checked-state-changed="updateIngredientCheckedState"
|
||||
@ -228,7 +226,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
use_plural: false,
|
||||
loading: true,
|
||||
recipe: undefined,
|
||||
rootrecipe: undefined,
|
||||
@ -251,10 +248,6 @@ export default {
|
||||
this.requestWakeLock()
|
||||
window.addEventListener('resize', this.handleResize);
|
||||
|
||||
let apiClient = new ApiApiFactory()
|
||||
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
|
||||
this.use_plural = r.data.use_plural
|
||||
})
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.destroyWakeLock()
|
||||
|
@ -151,9 +151,6 @@
|
||||
<b-form-checkbox v-model="space.show_facet_count"> Facet Count</b-form-checkbox>
|
||||
<span class="text-muted small">{{ $t('facet_count_info') }}</span><br/>
|
||||
|
||||
<b-form-checkbox v-model="space.use_plural">Use Plural form</b-form-checkbox>
|
||||
<span class="text-muted small">{{ $t('plural_usage_info') }}</span><br/>
|
||||
|
||||
<label>{{ $t('FoodInherit') }}</label>
|
||||
<generic-multiselect :initial_selection="space.food_inherit"
|
||||
:model="Models.FOOD_INHERIT_FIELDS"
|
||||
|
@ -12,7 +12,7 @@
|
||||
<cookbook-edit-card :book="book" v-if="current_page === 1" v-on:editing="cookbook_editing = $event" v-on:refresh="$emit('refresh')" @reload="$emit('reload')"></cookbook-edit-card>
|
||||
</transition>
|
||||
<transition name="flip" mode="out-in">
|
||||
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe" :use_plural="use_plural"></recipe-card>
|
||||
<recipe-card :recipe="display_recipes[0].recipe_content" v-if="current_page > 1" :key="display_recipes[0].recipe" ></recipe-card>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
|
@ -23,9 +23,9 @@
|
||||
<b-card-body class="m-0 py-0">
|
||||
<b-card-text class="h-100 my-0 d-flex flex-column" style="text-overflow: ellipsis">
|
||||
<h5 class="m-0 mt-1 text-truncate">{{ item[title] }}</h5>
|
||||
<template v-if="use_plural">
|
||||
|
||||
<div v-if="item[plural]!== '' && item[plural] !== null && item[plural] !== undefined" class="m-0 text-truncate">({{ $t("plural_short") }}: {{ item[plural] }})</div>
|
||||
</template>
|
||||
|
||||
<div class="m-0 text-truncate">{{ item[subtitle] }}</div>
|
||||
<div class="m-0 text-truncate small text-muted" v-if="getFullname">{{ getFullname }}</div>
|
||||
|
||||
|
@ -17,10 +17,7 @@
|
||||
</td>
|
||||
<td @click="done">
|
||||
<template v-if="ingredient.unit !== null && !ingredient.no_amount">
|
||||
<template v-if="!use_plural">
|
||||
<span>{{ ingredient.unit.name }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template >
|
||||
<template v-if="ingredient.unit.plural_name === '' || ingredient.unit.plural_name === null">
|
||||
<span>{{ ingredient.unit.name }}</span>
|
||||
</template>
|
||||
@ -38,10 +35,8 @@
|
||||
v-if="ingredient.food.recipe !== null" target="_blank"
|
||||
rel="noopener noreferrer">{{ ingredient.food.name }}</a>
|
||||
<template v-if="ingredient.food.recipe === null">
|
||||
<template v-if="!use_plural">
|
||||
<span>{{ ingredient.food.name }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
||||
<template>
|
||||
<template v-if="ingredient.food.plural_name === '' || ingredient.food.plural_name === null">
|
||||
<span>{{ ingredient.food.name }}</span>
|
||||
</template>
|
||||
@ -84,7 +79,6 @@ export default {
|
||||
props: {
|
||||
ingredient: Object,
|
||||
ingredient_factor: {type: Number, default: 1},
|
||||
use_plural:{type: Boolean, default: false},
|
||||
detailed: {type: Boolean, default: true},
|
||||
},
|
||||
mixins: [ResolveUrlMixin],
|
||||
|
@ -14,7 +14,6 @@
|
||||
<table class="table table-sm mb-0">
|
||||
|
||||
<ingredient-component v-for="i in steps.flatMap(s => s.ingredients)" v-bind:key="i.id"
|
||||
:use_plural="true"
|
||||
:detailed="true"
|
||||
:ingredient="i"
|
||||
:ingredient_factor="ingredient_factor"
|
||||
|
@ -84,8 +84,7 @@
|
||||
:steps="recipe.steps"
|
||||
:header="false"
|
||||
:detailed="false"
|
||||
:servings="recipe.servings"
|
||||
:use_plural="use_plural"/>
|
||||
:servings="recipe.servings"/>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<div class="col col-md-4"
|
||||
v-if="step.ingredients.length > 0 && (recipe.steps.length > 1 || force_ingredients)">
|
||||
<table class="table table-sm">
|
||||
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor" :use_plural="use_plural"
|
||||
<ingredients-card :steps="[step]" :ingredient_factor="ingredient_factor"
|
||||
@checked-state-changed="$emit('checked-state-changed', $event)"/>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user