Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templating: Document detail #37

Merged
merged 1 commit into from
Jul 23, 2019
Merged

templating: Document detail #37

merged 1 commit into from
Jul 23, 2019

Conversation

sebdeleze
Copy link
Contributor

NEW Format and show information on document detail page.
BETTER Add black support for code formatting

@@ -320,14 +321,17 @@ def marc21_to_series(self, key, value):


@marc21tojson.over('abstracts', '^520..')
@utils.for_each_value
@utils.ignore_value
def marc21_to_abstracts(self, key, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marc21tojson.over('abstracts', '^520..')
@utils.for_each_value
@utils.ignore_value
def marc21_to_abstracts(self, key, value):
    lang = value.get('9')
    abs = value.get('a')
    abstracts = self.get('abstracts', {})
    abstracts[lang] = abs
    return abstracts

@@ -58,4 +60,88 @@ def search():
def detail(pid, record, template=None, **kwargs):
"""Search details."""
g.ir = kwargs.get('ir')
return render_template('documents/record.html', pid=pid, record=record)
return render_template('documents/record.html',
pid=pid, record=record, ir=g.ir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if it is necessary g should be available in templates

@sebdeleze sebdeleze removed the request for review from Garfield-fr July 22, 2019 09:53
NEW Format and show information on document detail page.

Signed-off-by: Sébastien Délèze <sebastien.deleze@rero.ch>
@sebdeleze sebdeleze merged commit 272f6d3 into rero:master Jul 23, 2019
@sebdeleze sebdeleze deleted the sed-document-details branch July 23, 2019 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants