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

refs #17356 [fid_bbi] improve usability of tag edition forms

* adds some help texts
* additional info for user
* some styling
* fix styling of usertags menu entry
parent 9b224ff7
No related merge requests found
......@@ -122,6 +122,7 @@ user_email_in_from = true
[Social]
tags = enabled
max_tag_length = 25
[RecordPermissions]
WorldcatTab = enabled
......
......@@ -441,7 +441,7 @@ history_saved_searches = "Meine gespeicherten Suchen"
copied_link_to_clipboard = "Link in Zwischenablage kopiert"
#16050
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. Max. Länge eines Tags: 25 Zeichen. Längere Tags werden automatisch gekürzt. Wenn Sie hier einen Tag löschen, wird er vom Titel entfernt"
Your Tags = Meine Tags
#17355
......@@ -455,6 +455,11 @@ tags_record_count = "So getaggte Records"
tags_records_on_lists = "Auf folgenden Listen"
tags_browse = "Tags aller Nutzenden durchstöbern"
#17356
currently_on_list = "Zur Zeit in Liste ''%%list_name%%''"
delete_from_list = "Aus Liste ''%%list_name%%'' löschen"
add_tag_description = "Helfen Sie anderen bei der Bewertung dieses Titels, indem Sie möglichst passende Tags vergeben."
#16903
Open Access = Kostenfrei Zugänglich
......
......@@ -434,7 +434,7 @@ history_saved_searches = "My Saved Searches"
copied_link_to_clipboard = "Copied Link to Clipboard"
#16050
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 to separate tags. Maximum length of a tag is 25 characters. Longer tags will be truncated. If you delete a tag here it will be removed from the record"
Your Tags = My Tags
#17355
......@@ -448,6 +448,11 @@ tags_record_count = "No of Records with this tag"
tags_records_on_lists = "on favorite lists"
tags_browse = "Browse all user's tags"
#17356
currently_on_list = "currently on list ''%%list_name%%''"
delete_from_list = "Remove from list ''%%list_name%%''"
add_tag_description = "Help others to rate this title by assigning appropriate tags."
#16903
Open Access = Free Access
......
......@@ -485,6 +485,7 @@ footer {
.sidebar a.active {
background-color: $brand-secondary;
color: $white; //overrides finc standard
}
//// result body width
......@@ -670,4 +671,28 @@ tr.hline {
.tag-record.pull-right {
margin-left: 1rem;
}
.list-edit-container {
fieldset.list-edit-group {
border: none;
width: 100%;
}
.list-edit-group, & ~ {
h3 {
font-size: 1.1rem;
}
.form-group select {
@media screen and (max-width: $screen-xs-max) {
max-width:85%;
}
}
}
[id^="edit_tags"], [id^="edit_note"] {
max-width: 85%;
}
}
#modal .modal-dialog input#addtag_tag.form-control {
max-width: 85%;
}
\ No newline at end of file
<!-- fid_bbi: myresearch - edit -->
<?php
/**
* This is mostly a copy of themes/bootstrap3/templates/myresearch/edit.phtml
* FID BBI specific changes:
* * move List Name down to correspond
* to list selection drop down (#17356)
* * add descriptive text above input field
*
* @author Dorian Merz <merz@ub.uni-leipzig.de>
*/
?>
<?php
// Set up page title:
$this->headTitle($this->translate('Edit') . ' : ' . $this->driver->getBreadcrumb());
// Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Edit') . '</li>';
?>
<div class="record">
<h2><?=$this->escapeHtml($this->driver->getBreadcrumb())?></h2>
<form class="form-list-edit" method="post" name="editForm">
<?php if (empty($this->savedData)): ?>
<p class="alert alert-info">
<?php if (isset($listFilter)): ?>
<?=$this->transEsc('The record you selected is not part of the selected list.') ?>
<?php else: ?>
<?=$this->transEsc('The record you selected is not part of any of your lists.') ?>
<?php endif; ?>
</p>
<?php else: ?>
<div class="list-edit-container">
<?php foreach ($this->savedData as $i => $current): ?>
<fieldset class="list-edit-group">
<h3><?=$this->translate('currently_on_list',['%%list_name%%' => $this->escapeHtml($current['listTitle'])]) ?></h3>
<input type="hidden" name="lists[]" value="<?=$current['listId'] ?>"/>
<?php if ($this->usertags()->getMode() !== 'disabled'): ?>
<hr/>
<h3><?=$this->transEsc('Add Tags') ?></h3>
<div class="form-group">
<?php /* fid_bbi: add descriptive text aove input field, cf. #17356, DM */?>
<p class="help-block"><?=$this->transEsc("add_tag_description")?></p>
<label class="control-label" for="edit_tags<?=$current['listId'] ?>"><?=$this->transEsc('Tags') ?>:</label>
<input type="text" name="tags<?=$current['listId'] ?>" id="edit_tags<?=$current['listId'] ?>" class="form-control" value="<?=$this->escapeHtmlAttr($current['tags'])?>"/>
<span class="help-block"><?=$this->transEsc("add_tag_note") ?></span>
</div>
<?php endif; ?>
<hr/>
<div class="form-group">
<label class="control-label" for="edit_notes<?=$current['listId'] ?>"><?=$this->transEsc('Notes') ?>:</label>
<textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea>
</div>
<hr/>
<a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&amp;source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" data-lightbox>
<i class="fa fa-trash"></i> <?=$this->transEsc('delete_from_list',['%%list_name%%' => $this->escapeHtml($current['listTitle'])]) ?>
</a>
</fieldset>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (count($this->lists) > 0): ?>
<hr/>
<div class="form-group">
<select name="addToList" class="form-control">
<option value="-1">- <?=$this->transEsc('Add to another list')?> -</option>
<?php foreach ($this->lists as $listID => $listTitle): ?>
<option value="<?=$listID ?>"><?=$this->escapeHtml($listTitle) ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if (!empty($this->savedData) || count($this->lists) > 0): ?>
<div class="form-group">
<input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Save') ?>"/>
</div>
<?php endif; ?>
</form>
</div>
<!-- fid_bbi: myresearch - edit - END -->
\ No newline at end of file
......@@ -63,7 +63,10 @@
<br/>
<h4><?=$this->translate('Your Tags')?></h4>
<div class="myresearch-menu">
<a href="<?=$this->url('myresearch-usertags')?>"><?=$this->translate('show_usertags')?></a>
<a href="<?=$this->url('myresearch-usertags')?>"<?=$this->active == 'tags' ? ' class="active"' : ''?>>
<i class="fa fa-fw fa-tags" aria-hidden="true"></i>
<?=$this->translate('show_usertags')?>
</a>
</div>
<?php endif; ?>
......@@ -100,5 +103,5 @@
<a href="<?=$this->url('fid/admin/list')?>"><?=$this->transEsc('fid::permission_read_user_list')?></a>
</div>
<?php endif; ?>
<!-- fid_bbi: myresearch - menu.phtml END -->
<?php endif; ?>
<!-- fid_bbi: myresearch - menu.phtml END -->
\ No newline at end of file
......@@ -18,6 +18,7 @@
<td><?=$tag->cnt ?></td>
<td>
<?php $onLists = explode(',',$tag->lists ?? '');
sort($onLists);
if (!empty($onLists)):?>
<? foreach ($onLists as $id): ?>
<?php if ($list = $lists[$id] ?? null): ?>
......@@ -37,6 +38,6 @@
</div>
<div class="<?=$this->layoutClass('sidebar')?>">
<?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'profile'])?>
<?=$this->context($this)->renderInContext("myresearch/menu.phtml", ['active' => 'tags'])?>
</div>
<!-- fid_bbi: myresearch - usertags - END -->
\ No newline at end of file
<!-- fid_bbi: record - addtag -->
<?php
/**
* This is mostly a copy of themes/bootstrap3/templates/record/addtag.phtml
* FID BBI specific changes:
* * add description block above input field
*
* @author Dorian Merz <merz@ub.uni-leipzig.de>
*/
?>
<?php
// Set page title.
$this->headTitle($this->translate('Add Tag'));
// Set up breadcrumbs:
$this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ')
. '<li>' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> '
. '<li class="active">' . $this->transEsc('Add Tag') . '</li>';
?>
<h2><?=$this->transEsc('Add Tags') ?></h2>
<form method="post" name="tagRecord" class="form-add-tag" data-lightbox-onclose="refreshTagListCallback">
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="id" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" />
<input type="hidden" name="source" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" />
<div class="form-group">
<?php /* fid_bbi: add descriptive text aove input field, cf. #17356, DM */?>
<p class="help-block"><?=$this->transEsc("add_tag_description")?></p>
<label class="control-label" for="addtag_tag"><?=$this->transEsc("Tags")?>:</label>
<input id="addtag_tag" type="text" name="tag" value="" size="40" class="form-control"/>
<p class="help-block"><?=$this->transEsc("add_tag_note")?></p>
</div>
<div class="form-group">
<input class="btn btn-primary" type="submit" value="<?=$this->transEsc('Save')?>"/>
</div>
</form
<!-- fid_bbi: record - addtag - 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