Skip to content

Commit

Permalink
User interface: admin pages and jinja templates
Browse files Browse the repository at this point in the history
* BETTER: lighten the front page search input button color
* BETTER: resize the front page background image
* BETTER: remove unused SCSS rules or replace them by a bootstrap class
* BETTER: enhance the search results views
* BETTER: enhance the editors views
* NEW: add delete fonction in libraries and documents brief views
* FIX: fix locale for schema and forms
* add a rule for typscript files in the .editorconfig

Signed-off-by: Igor Milhit <igor.milhit@rero.ch>
Co-authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
  • Loading branch information
Igor Milhit and jma committed Feb 16, 2019
1 parent 579e852 commit 9be0838
Show file tree
Hide file tree
Showing 57 changed files with 781 additions and 665 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ skip = .eggs
[*.rst]
indent_size = 4

# CSS, HTML, JS, JSON, YML
[*.{scss,css,html,js,json,yml}]
# CSS, HTML, JS, JSON, YML, Typescript
[*.{scss,css,html,js,json,yml,ts}]
indent_size = 2

# Matches the exact files either package.json or .travis.yml
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _(x):
record_class='rero_ils.modules.documents.api:Document',
item_route='/documents/<pid(doc, record_class="rero_ils.modules.documents.api:Document"):pid_value>',
default_media_type='application/json',
max_result_window=10000,
max_result_window=5000000,
search_factory_imp='rero_ils.query:and_search_factory',
read_permission_factory_imp=allow_all,
list_permission_factory_imp=allow_all
Expand Down
2 changes: 1 addition & 1 deletion rero_ils/modules/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def is_accessible(self):
}

locations = {
'view_class': ILSManager,
'view_class': LibraryManager,
'kwargs': dict(
name='Locations',
category='Resources',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"title": "Authors",
"description": "Author(s) of the resource. Can be either persons or organisations.",
"type": "array",
"minItems": 1,
"minItems": 0,
"items": {
"type": "object",
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,8 @@
"title": "ISBN"
},
{
"type": "fieldset",
"title": "Title",
"items": [
{
"key": "title",
"notitle": true,
"htmlClass": "rero21-required"
}
]
"key": "title",
"htmlClass": "rero21-required"
},
{
"type": "fieldset",
Expand All @@ -27,7 +20,6 @@
"add": "btn-link"
},
"type": "array",
"startEmpty": true,
"items": [
{
"key": "authors[].type",
Expand All @@ -45,19 +37,23 @@
],
"style": {
"selected": "btn-success",
"unselected": "btn-default"
"unselected": "btn-light"
}
},
{
"key": "authors[].name"
},
{
"key": "authors[].date",
"condition": "model.authors[arrayIndex].type == 'person'"
"condition": {
"functionBody": "{return model.authors[arrayIndices[0]].type === 'person';}"
}
},
{
"key": "authors[].qualifier",
"condition": "model.authors[arrayIndex].type == 'person'"
"condition": {
"functionBody": "{return model.authors[arrayIndices[0]].type === 'person';}"
}
}
]
}
Expand All @@ -69,71 +65,75 @@
"items": [
{
"key": "languages",
"notitle": false,
"title": "Language(s) name",
"notitle": true,
"description": "",
"add": "new language",
"style": {
"add": "btn-link"
},
"startEmpty": false,
"type": "array",
"validationMessage": {
"402": "<span class=\"text-danger\">Language value should be unique!</span>"
},
"items": [
{
"key": "languages[].language",
"notitle": true,
"description": "",
"htmlClass": "rero21-required",
"titleMap": [
{
"value": "ara",
"name": "Arabic"
},
{
"value": "chi",
"name": "Chinese"
},
{
"value": "eng",
"name": "English"
},
{
"value": "fre",
"name": "French"
},
{
"value": "ger",
"name": "German"
},
{
"value": "heb",
"name": "Hebrew"
},
{
"value": "ita",
"name": "Italian"
},
{
"value": "jpn",
"name": "Japanese"
},
{
"value": "lat",
"name": "Latin"
},
{
"value": "por",
"name": "Portuguese"
},
{
"value": "rus",
"name": "Russian"
},
"type": "fieldset",
"items": [
{
"value": "spa",
"name": "Spanish"
"key": "languages[].language",
"notitle": true,
"description": "",
"htmlClass": "rero21-required",
"titleMap": [
{
"value": "ara",
"name": "Arabic"
},
{
"value": "chi",
"name": "Chinese"
},
{
"value": "eng",
"name": "English"
},
{
"value": "fre",
"name": "French"
},
{
"value": "ger",
"name": "German"
},
{
"value": "heb",
"name": "Hebrew"
},
{
"value": "ita",
"name": "Italian"
},
{
"value": "jpn",
"name": "Japanese"
},
{
"value": "lat",
"name": "Latin"
},
{
"value": "por",
"name": "Portuguese"
},
{
"value": "rus",
"name": "Russian"
},
{
"value": "spa",
"name": "Spanish"
}
]
}
]
}
Expand All @@ -146,54 +146,19 @@
"title": "Date of publication",
"items": [
{
"type": "section",
"htmlClass": "row",
"items": [
{
"type": "section",
"htmlClass": "col-xs-6",
"items": [
{
"key": "publicationYear",
"type": "integer"
}
]
},
{
"type": "section",
"htmlClass": "col-xs-6",
"items": [
{
"key": "freeFormedPublicationDate",
"condition": "model.publicationYear"
}
]
}
]
"key": "publicationYear",
"notitle": true,
"type": "integer"
},
{
"key": "freeFormedPublicationDate",
"condition": "model.publicationYear"
}
]
},
{
"type": "fieldset",
"title": "Type of the document",
"items": [
{
"type": "section",
"htmlClass": "row",
"items": [
{
"type": "section",
"htmlClass": "col-xs-4",
"items": [
{
"key": "type",
"title": "Document type",
"description": "Type of the document"
}
]
}
]
}
]
"key": "type",
"title": "Document type",
"description": "Type of the document"
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h3 class="d-inline-block">{{ _('Export Formats') }}:</h3>
<ul class="list-inline d-inline-block">
{%- for slug, fmt in formats %}
<li>
<a href="{{ url_for('invenio_records_ui.doc_export', pid_value=pid.pid_value, format=slug) }}">
<a href="{{ url_for('invenio_records_ui.doc_export', pid_value=pid.pid_value, format=slug, prettyprint=True) }}">
{{ fmt.title }}
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h3 itemprop="name"> {{ format_title }} Export</h3>
</header>
<article class="card bg-light mb-4">
<pre class="mb-0 p-2 text-muted">{{ data|tojson_pretty }}</pre>
<pre class="mb-0 p-2 text-muted">{{ data|safe }}</pre>
</article>
</section>
{% endblock record_body %}
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
[
{
"type": "fieldset",
"title": "Item Type",
"items": [
{
"title": "Organisation",
"key": "organisation.$ref",
"type": "select",
"remoteRecordType": "organisations"
},
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
{
"key": "name",
"htmlClass": "px-2",
"validationMessage": {
"alreadyTakenMessage": "The item type name is already taken"
},
"remoteRecordType": "item_types"
},
{
"htmlClass": "px-2",
"key": "description"
}
]
}
]
"title": "Organisation",
"key": "organisation.$ref",
"type": "select",
"remoteRecordType": "organisations",
"readonly": "true"
},
{
"key": "name",
"validationMessage": {
"alreadyTakenMessage": "The item type name is already taken"
},
"remoteRecordType": "item_types"
},
{
"key": "description"
}
]

This file was deleted.

Loading

0 comments on commit 9be0838

Please sign in to comment.