Skip to content

Commit

Permalink
Merge branch '4.x' into fix/translations
Browse files Browse the repository at this point in the history
  • Loading branch information
peimn committed Feb 2, 2024
2 parents 3d6c63b + 599a260 commit d5b5b93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions resources/js/components/fieldtypes/replicator/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</label>

<div
class="help-block"
class="help-block" :class="{ '-mt-2': showLabel }"
v-if="instructions && field.instructions_position !== 'below'"
v-html="instructions" />

Expand Down Expand Up @@ -37,7 +37,7 @@
v-html="instructions" />

<div v-if="hasError">
<small class="help-block text-red-500 mt-2" v-for="(error, i) in errors" :key="i" v-text="error" />
<small class="help-block text-red-500 mt-2 mb-0" v-for="(error, i) in errors" :key="i" v-text="error" />
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/CP/Taxonomies/TaxonomiesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ public function edit($taxonomy)
'collections' => $taxonomy->collections()->map->handle()->all(),
'sites' => $taxonomy->sites()->all(),
'preview_targets' => $taxonomy->basePreviewTargets(),
'term_template' => $taxonomy->termTemplate,
'template' => $taxonomy->template,
'term_template' => $taxonomy->hasCustomTermTemplate() ? $taxonomy->termTemplate() : null,
'template' => $taxonomy->hasCustomTemplate() ? $taxonomy->template() : null,
'layout' => $taxonomy->layout(),
];

Expand Down
10 changes: 10 additions & 0 deletions src/Taxonomies/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,4 +518,14 @@ private function previewTargetsForFile()
];
})->filter()->values()->all();
}

public function hasCustomTemplate()
{
return $this->template !== null;
}

public function hasCustomTermTemplate()
{
return $this->termTemplate !== null;
}
}

0 comments on commit d5b5b93

Please sign in to comment.