Skip to content
Snippets Groups Projects
Commit 473cae20 authored by Dorian Merz's avatar Dorian Merz
Browse files

refs #17355 [fid_bbi] improved tag handling

* removes counting for tags
* adds markings for "tagged by you" and "tagged by others"
* clarifies tag usage by improved wording
parent 24d12d3f
No related merge requests found
...@@ -120,8 +120,8 @@ sender_email = "noreply@hab.de" ...@@ -120,8 +120,8 @@ sender_email = "noreply@hab.de"
require_login = false require_login = false
user_email_in_from = true user_email_in_from = true
;[Social] [Social]
;tags = enabled tags = enabled
[RecordPermissions] [RecordPermissions]
WorldcatTab = enabled WorldcatTab = enabled
......
...@@ -444,6 +444,12 @@ copied_link_to_clipboard = "Link in Zwischenablage kopiert" ...@@ -444,6 +444,12 @@ copied_link_to_clipboard = "Link in Zwischenablage kopiert"
add_tag_note = "Trennen Sie Tags mit einem Leerzeichen oder mit [ENTER]. Max. Länge eines Tags: 25 Zeichen." add_tag_note = "Trennen Sie Tags mit einem Leerzeichen oder mit [ENTER]. Max. Länge eines Tags: 25 Zeichen."
Your Tags = Meine Tags Your Tags = Meine Tags
#17355
tagged_by_you = "von Ihnen markiert"
tagged_by_others = "von anderen markiert"
delete_tag = "Ihre Markierung entfernen"
confirm_tag = "ebenfalls markieren"
#16903 #16903
Open Access = Kostenfrei Zugänglich Open Access = Kostenfrei Zugänglich
......
...@@ -437,6 +437,12 @@ copied_link_to_clipboard = "Copied Link to Clipboard" ...@@ -437,6 +437,12 @@ copied_link_to_clipboard = "Copied Link to Clipboard"
add_tag_note = "Use a whitespace character or press [ENTER] to separate tags. Maximum length of a tag is 25 characters." add_tag_note = "Use a whitespace character or press [ENTER] to separate tags. Maximum length of a tag is 25 characters."
Your Tags = My Tags Your Tags = My Tags
#17355
tagged_by_you = "tagged by you"
tagged_by_others = "tagged by other users"
delete_tag = "remove your tag"
confirm_tag = "add your tag"
#16903 #16903
Open Access = Free Access Open Access = Free Access
......
...@@ -629,3 +629,13 @@ button.search-filter-toggle { ...@@ -629,3 +629,13 @@ button.search-filter-toggle {
width: 100%; width: 100%;
} }
.tag .tag-icon {
&.tagged-by-me {
@extend .fa;
@extend .fa-user;
}
&.tagged-by-others {
@extend .fa;
@extend .fa-users;
}
}
\ No newline at end of file
<!-- fid_bbi: record - taglist -->
<?php /* this is mostly a copy of the bootstrap3 version */?>
<div class="tagList<?=$loggedin ? ' loggedin' : ''?>">
<?php if (count($tagList) > 0): ?>
<?php foreach ($tagList as $tag): ?>
<?php $is_me = isset($tag['is_me']) && null !== $tag['is_me'] ? $tag['is_me'] : false;
$is_others = !$is_me || ($tag['cnt'] > 1);
?>
<div class="tag">
<?php if ($is_me): ?><i class="tag-icon tagged-by-me" title="<?=$this->translate('tagged_by_you')?>"></i><?php endif;?>
<?php if ($is_others): ?><i class="tag-icon tagged-by-others" title="<?=$this->translate('tagged_by_others')?>"></i><?php endif;?>
<a href="<?=$this->url('tag-home')?>?lookfor=<?=urlencode($tag['tag'])?>"><?=$this->escapeHtml($tag['tag'])?></a>
<?php if($loggedin): ?>
<form method="POST" action="<?=$this->recordLink()->getActionUrl($this->driver, $is_me ? 'DeleteTag' : 'AddTag') ?>" class="tag-form">
<input type="hidden" name="tag" value="<?=$this->escapeHtmlAttr($tag['tag'])?>"/>
<button type="submit" class="badge" onClick="ajaxTagUpdate(this, '<?=$this->escapeHtmlAttr($tag['tag'])?>', <?=$is_me ? 'true' : 'false' ?>);return false;">
<?php if($is_me): ?>
<i class="fa fa-close" title="<?=$this->transEsc('delete_tag') ?>"></i>
<?php else: ?>
<i class="fa fa-plus" title="<?=$this->transEsc('confirm_tag') ?>"></i>
<?php endif; ?>
</button>
</form>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php else: ?>
<?=$this->transEsc('No Tags')?>, <?=$this->transEsc('Be the first to tag this record')?>!
<?php endif; ?>
</div>
<!-- fid_bbi: record - taglist - END -->
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment