Skip to content

Commit

Permalink
Merge pull request #33 from devgeniem/TMS-357
Browse files Browse the repository at this point in the history
TMS 357 Taitelija-sivun muutokset
  • Loading branch information
tim0haapala authored Nov 2, 2021
2 parents 7dad74f + 5f6f934 commit b94cf3e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 95 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added
- TMS-357 Single Artist: New ACF field fort short desc.

## [1.8.0] - 2021-10-25

### Changed

- TMS-357 Single Artist: Layout changes.
- TMS-349: Fix event view styles #29
- TMS-348: Make post type url slugs translatable with Polylang #30
- TMS-346: Fix principal and concertmaster mix up #27
Expand Down
12 changes: 12 additions & 0 deletions lib/ACF/ArtistGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ protected function get_details_tab( string $key ) : Field\Tab {
'title' => 'Titteli',
'instructions' => '',
],
'short_description' => [
'title' => 'Lyhyt kuvaus',
'instructions' => '',
],
'description' => [
'title' => 'Kuvaus',
'instructions' => '',
Expand Down Expand Up @@ -149,6 +153,13 @@ protected function get_details_tab( string $key ) : Field\Tab {
->redipress_include_search()
->set_instructions( $strings['title']['instructions'] );

$short_description_field = ( new Field\Textarea( $strings['short_description']['title'] ) )
->set_key( "${key}_short_description" )
->set_name( 'short_description' )
->redipress_include_search()
->set_wrapper_width( 50 )
->set_instructions( $strings['short_description']['instructions'] );

$description_field = ( new TextEditor( $strings['description']['title'] ) )
->set_key( "${key}_description" )
->set_name( 'description' )
Expand Down Expand Up @@ -198,6 +209,7 @@ protected function get_details_tab( string $key ) : Field\Tab {
$first_name_field,
$last_name_field,
$title_field,
$short_description_field,
$description_field,
$additional_info_repeater,
$is_concertmaster_field,
Expand Down
141 changes: 48 additions & 93 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions partials/single-artist.dust
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
{content.fields.title|s}
</div>
{/content.fields.title}

{content.fields.description|s}
{?content.fields.short_description}
<p>
{content.fields.short_description|s}
</p>
{/content.fields.short_description}

{?content.fields.additional_information}
{>"shared/additional-info-list" data=content.fields.additional_information list_class="mt-6" /}
Expand All @@ -29,6 +32,13 @@
{@image id=content.image.id size="large" /}
</div>
{/content.image}

{?content.fields.description}
<div class="column is-8-desktop is-offset-1-desktop entry__content keep-vertical-spacing">
{content.fields.description|s}
</div>
{/content.fields.description}

</article>

<div class="columns">
Expand Down

0 comments on commit b94cf3e

Please sign in to comment.