Merge pull request #815 from tainacan/feature/814

Adds links to item, collection, taxonomy and terms on website from ad…
This commit is contained in:
Mateus Machado Luna 2023-10-17 19:05:35 -03:00 committed by GitHub
commit c252222955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 198 additions and 13 deletions

View File

@ -260,7 +260,7 @@
popperClass: ['tainacan-tooltip', 'tooltip']
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-openurl"/>
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</li>

View File

@ -349,6 +349,24 @@
class="tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
id="button-open-external"
:aria-label="$i18n.getFrom('collections','view_item')"
@click.stop=""
target="_blank"
:href="collection.url">
<span
v-tooltip="{
content: $i18n.get('label_view_collection_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</td>
</tr>

View File

@ -303,6 +303,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</div>
@ -448,6 +467,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</div>
</li>
@ -579,6 +617,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
<!-- Remaining metadata -->
@ -802,6 +859,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
<!-- Remaining metadata -->
@ -1147,7 +1223,26 @@
<i
:class="{ 'tainacan-icon-delete': !isOnTrash, 'tainacan-icon-deleteforever': isOnTrash }"
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</td>
@ -1304,6 +1399,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
<!-- Remaining metadata -->
@ -1779,6 +1893,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('items','view_item')"
@click.stop=""
target="_blank"
:href="item.url">
<span
v-tooltip="{
content: $i18n.get('label_item_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', isRepositoryLevel ? 'tainacan-repository-tooltip' : ''],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
<!-- Remaining metadata -->

View File

@ -235,6 +235,25 @@
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
</a>
<a
v-if="!isOnTrash"
id="button-open-external"
:aria-label="$i18n.getFrom('taxonomies','view_item')"
@click.stop=""
target="_blank"
:href="themeTaxonomiesURL + taxonomy.slug">
<span
v-tooltip="{
content: $i18n.get('label_taxonomy_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</td>
</tr>
@ -263,7 +282,8 @@
selected: [],
allOnPageSelected: false,
isSelecting: false,
adminUrl: tainacan_plugin.admin_url
adminUrl: tainacan_plugin.admin_url,
themeTaxonomiesURL: tainacan_plugin.theme_taxonomy_list_url
}
},
computed: {

View File

@ -136,9 +136,23 @@
placement: 'bottom'
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-delete"/>
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-delete"/>
</span>
</button>
<a
target="_blank"
:href="term.url">
<span
v-tooltip="{
content: $i18n.get('label_term_page_on_website'),
autoHide: true,
popperClass: ['tainacan-tooltip', 'tooltip', 'tainacan-repository-tooltip'],
placement: 'bottom'
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
</a>
</div>
</label>
<button

View File

@ -72,7 +72,7 @@
class="button"
id="view-collection-button">
<span class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-openurl"/>
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
<span class="is-hidden-mobile">{{ $i18n.get('label_view_collection_on_website') }}</span>
</a>
@ -85,7 +85,7 @@
class="button"
id="view-repository-button--taxonomies">
<span class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-openurl"/>
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
<span class="is-hidden-mobile">{{ $i18n.get('label_view_taxonomies_on_website') }}</span>
</a>
@ -98,7 +98,7 @@
class="button"
id="view-repository-button">
<span class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-openurl"/>
<i class="tainacan-icon tainacan-icon-1-125em tainacan-icon-openurl"/>
</span>
<span class="is-hidden-mobile">{{ $i18n.get('label_view_collections_on_website') }}</span>
</a>

View File

@ -273,7 +273,7 @@
<section
v-if="!isLoadingFilters &&
!((filters.length >= 0 && isRepositoryLevel) || filters.length > 0)"
class="is-grouped-centered section">
class="is-grouped-centered">
<div class="content has-text-gray has-text-centered">
<p>
<span class="icon is-large">

View File

@ -304,14 +304,14 @@
position: -webkit-sticky !important;
right: 0px;
top: auto;
width: 80px;
width: 100px;
.actions-container {
display: flex;
position: relative;
padding: 0;
height: 100%;
width: 80px;
width: 100px;
z-index: 9;
background-color: var(--tainacan-white);
float: right;

View File

@ -131,7 +131,7 @@
}
.metadata-title {
flex-shrink: 0;
padding: 0.6em 5em 0.5em 2.75em;
padding: 0.6em 7em 0.5em 2.75em;
min-height: 40px;
position: relative;
font-size: 1em !important;

View File

@ -102,7 +102,7 @@
}
.metadata-title {
flex-shrink: 0;
padding: 0.5em 4.75em 0.5em 2.75em;
padding: 0.5em 7em 0.5em 2.75em;
min-height: 40px;
position: relative;
font-size: 1em !important;

View File

@ -110,7 +110,7 @@
}
.metadata-title {
flex-shrink: 0;
padding: 0.5em 4.75em 0.5em 2.75em;
padding: 0.5em 7em 0.5em 2.75em;
font-size: 1.0em !important;
min-height: 40px;
position: relative;