|
63 | 63 | * @uses $licenseUrl string URL to license. Only assigned if license should be
|
64 | 64 | * included with published submissions.
|
65 | 65 | * @uses $ccLicenseBadge string An image and text with details about the license
|
| 66 | + * @uses $pubLocData array Array of formatted publication locale metadata: titles, abstracts, keywords, |
66 | 67 | *}
|
67 | 68 | <article class="obj_preprint_details">
|
68 | 69 |
|
|
108 | 109 | <span class="separator">{translate key="navigation.breadcrumbSeparator"}</span>
|
109 | 110 | <span class="preprint_version">{translate key="publication.version" version=$publication->getData('version')}</span>
|
110 | 111 |
|
111 |
| - <h1 class="page_title"> |
112 |
| - {$publication->getLocalizedTitle(null, 'html')|strip_unsafe_html} |
| 112 | + <h1 class="page_title" lang="{$pubLocData.primaryLocale|replace:"_":"-"}"> |
| 113 | + {$pubLocData.primaryTitle|strip_unsafe_html} |
113 | 114 | </h1>
|
114 | 115 |
|
115 |
| - {if $publication->getLocalizedData('subtitle')} |
116 |
| - <h2 class="subtitle"> |
117 |
| - {$publication->getLocalizedSubTitle(null, 'html')|strip_unsafe_html} |
| 116 | + {if !empty(count($pubLocData.titles.text))} |
| 117 | + <section class="page_locale_titles"> |
| 118 | + {foreach from=$pubLocData.titles.text key=locale item=title} |
| 119 | + <p lang="{$locale|replace:"_":"-"}"> |
| 120 | + {$title|strip_unsafe_html} |
| 121 | + </p> |
| 122 | + {/foreach} |
| 123 | + </section> |
| 124 | + {/if} |
| 125 | + |
| 126 | + {if $publication->getData('subtitle', $pubLocData.primaryLocale)} |
| 127 | + <h2 class="subtitle" lang="{$pubLocData.primaryLocale|replace:"_":"-"}"> |
| 128 | + {$publication->getData('subtitle', $pubLocData.primaryLocale)|strip_unsafe_html} |
118 | 129 | </h2>
|
119 | 130 | {/if}
|
120 | 131 |
|
|
168 | 179 | {/if}
|
169 | 180 |
|
170 | 181 | {* Keywords *}
|
171 |
| - {if !empty($publication->getLocalizedData('keywords'))} |
172 |
| - <section class="item keywords"> |
173 |
| - <h2 class="label"> |
174 |
| - {capture assign=translatedKeywords}{translate key="preprint.subject"}{/capture} |
175 |
| - {translate key="semicolon" label=$translatedKeywords} |
176 |
| - </h2> |
177 |
| - <span class="value"> |
178 |
| - {foreach name="keywords" from=$publication->getLocalizedData('keywords') item="keyword"} |
179 |
| - {$keyword|escape}{if !$smarty.foreach.keywords.last}{translate key="common.commaListSeparator"}{/if} |
180 |
| - {/foreach} |
181 |
| - </span> |
182 |
| - </section> |
| 182 | + {if !empty(count($pubLocData.keywords.text))} |
| 183 | + <section class="item keywords"> |
| 184 | + {foreach from=$pubLocData.keywords.text key=locale item=keywords} |
| 185 | + <section> |
| 186 | + <h2 class="label" lang="{$pubLocData.keywords.header[$locale]|replace:"_":"-"}"> |
| 187 | + {capture assign=translatedKeywords}{translate key="preprint.subject" locale=$pubLocData.keywords.header[$locale]}{/capture} |
| 188 | + {translate key="semicolon" label=$translatedKeywords locale=$pubLocData.keywords.header[$locale]} |
| 189 | + </h2> |
| 190 | + <span class="value" lang="{$locale|replace:"_":"-"}"> |
| 191 | + {foreach name="keywords" from=$keywords item="keyword"} |
| 192 | + {$keyword|escape}{if !$smarty.foreach.keywords.last}{translate key="common.commaListSeparator" locale=$pubLocData.keywords.header[$locale]}{/if} |
| 193 | + {/foreach} |
| 194 | + </span> |
| 195 | + </section> |
| 196 | + {/foreach} |
| 197 | + </section> |
183 | 198 | {/if}
|
184 | 199 |
|
185 | 200 | {* Abstract *}
|
186 |
| - {if $publication->getLocalizedData('abstract')} |
187 |
| - <section class="item abstract"> |
188 |
| - <h2 class="label">{translate key="common.abstract"}</h2> |
189 |
| - {$publication->getLocalizedData('abstract')|strip_unsafe_html} |
| 201 | + {if !empty(count($pubLocData.abstract.text))} |
| 202 | + <section class="item abstracts"> |
| 203 | + {foreach from=$pubLocData.abstract.text key=locale item=abstract} |
| 204 | + <section class="abstract"> |
| 205 | + <h2 class="label" lang="{$pubLocData.abstract.header[$locale]|replace:"_":"-"}"> |
| 206 | + {translate key="preprint.abstract" locale=$pubLocData.abstract.header[$locale]} |
| 207 | + </h2> |
| 208 | + <span lang="{$locale|replace:"_":"-"}">{$abstract|strip_unsafe_html}</span> |
| 209 | + </section> |
| 210 | + {/foreach} |
190 | 211 | </section>
|
191 | 212 | {/if}
|
192 | 213 |
|
|
0 commit comments