Skip to content

Commit

Permalink
documents: add a back button in detail views
Browse files Browse the repository at this point in the history
* Adds a button to go back to search results in documents detail views.
* Reduces the size of `Back to SONAR` button in organisation's context.
* Closes #383.

Co-Authored-by: Sébastien Délèze <sebastien.deleze@rero.ch>
  • Loading branch information
Sébastien Délèze committed Dec 15, 2020
1 parent 89d12de commit 47070cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions sonar/modules/documents/templates/documents/record.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
{% set files = record.get_files_list() %}

<section class="mt-3">
<div class="mb-3">
<a href="javascript: history.back(-1)">
<i class="fa fa-arrow-left mr-1"></i> {{ _('Back') }}
</a>
</div>
<div class="row">
<div class="col-lg-3 text-center">
{% if files and files | length > 0 %}
Expand Down
6 changes: 3 additions & 3 deletions sonar/theme/templates/sonar/partial/organisation.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ <h1 class="mb-2">{{ g.organisation.name }}</h1>
</form>
</div>
<div class="col text-right">
<a href="{{url_for('documents.index', view=config.SONAR_APP_DEFAULT_ORGANISATION)}}"
class="btn btn-outline-primary">
{{_('Back to SONAR')}}
<a href="{{ url_for('documents.index', view=config.SONAR_APP_DEFAULT_ORGANISATION) }}"
class="btn btn-outline-primary btn-sm">
{{ _('Back to SONAR') }}
</a>
</div>
</div>
Expand Down

0 comments on commit 47070cf

Please sign in to comment.