diff --git a/fid_bbi/config/vufind/config.ini b/fid_bbi/config/vufind/config.ini index e88ec512d438db88608379be3a4900086b0ac3f7..328b50ae64c2c310347223e1eea4909beb3917b4 100644 --- a/fid_bbi/config/vufind/config.ini +++ b/fid_bbi/config/vufind/config.ini @@ -120,8 +120,8 @@ sender_email = "noreply@hab.de" require_login = false user_email_in_from = true -;[Social] -;tags = enabled +[Social] +tags = enabled [RecordPermissions] WorldcatTab = enabled diff --git a/fid_bbi/languages/de.ini b/fid_bbi/languages/de.ini index b02e5c1d9406550597a8890797a0fad0343e4d73..0e2e457cfdc99c922d83677cf22dbb0741f9501b 100644 --- a/fid_bbi/languages/de.ini +++ b/fid_bbi/languages/de.ini @@ -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." 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 Open Access = Kostenfrei Zugänglich diff --git a/fid_bbi/languages/en.ini b/fid_bbi/languages/en.ini index 64fc44ddf14b77676f4e4ae3fea6d9ea78bfbbc4..84ca71a74fffa0bf5484123082f5765a2b6287d8 100644 --- a/fid_bbi/languages/en.ini +++ b/fid_bbi/languages/en.ini @@ -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." 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 Open Access = Free Access diff --git a/themes/fid_bbi/scss/compiled.scss b/themes/fid_bbi/scss/compiled.scss index 0a1c0559582b09e96c754969d57a2c1a9892ba7d..fed1f2b7125f0531598b13b654078e6c3c8f3840 100644 --- a/themes/fid_bbi/scss/compiled.scss +++ b/themes/fid_bbi/scss/compiled.scss @@ -629,3 +629,13 @@ button.search-filter-toggle { 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 diff --git a/themes/fid_bbi/templates/record/taglist.phtml b/themes/fid_bbi/templates/record/taglist.phtml new file mode 100644 index 0000000000000000000000000000000000000000..1a1084abe17eb0914f658cb81a964b82970aca4c --- /dev/null +++ b/themes/fid_bbi/templates/record/taglist.phtml @@ -0,0 +1,31 @@ +<!-- 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