Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SWIFTweb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTweb
Commits
0c2d0e80
Commit
0c2d0e80
authored
2 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Invert the paper counter and list the total at the top
parent
f53b62c8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
query.py
+2
-1
2 additions, 1 deletion
query.py
templates/pubs.html
+17
-12
17 additions, 12 deletions
templates/pubs.html
with
19 additions
and
13 deletions
query.py
+
2
−
1
View file @
0c2d0e80
...
...
@@ -12,7 +12,8 @@ for paper in paper_list:
paper
.
title
=
paper
.
title
[
0
]
# Create a dictionary of cards
my_list
=
dict
({
"
cards
"
:
paper_list
})
my_list
=
dict
({
"
num_papers
"
:
query_data
.
num_found
,
"
cards
"
:
paper_list
})
# Silence the yaml object naming
def
noop
(
self
,
*
args
,
**
kw
):
...
...
This diff is collapsed.
Click to expand it.
templates/pubs.html
+
17
−
12
View file @
0c2d0e80
...
...
@@ -9,19 +9,24 @@
<div
class=
"container"
>
{{ helper.navbar(navbar, link) }}
<div
class=
"text"
>
<h2>
Publications using SWIFT
</h2>
</div>
<br/>
<div
class=
"text"
>
<h2>
Publications using SWIFT
</h2>
</div>
<div>
The following {{ num_papers }} have made use of SWIFT for their results:
</div>
{% set count = num_papers %}
{% for card in cards|sort_cards %}
<div
class=
"card-text"
>
<h4>
{{ loop.index }})
<a
href=
"https://ui.adsabs.harvard.edu/abs/{{ card.bibcode }}/abstract"
>
{{ card.title }}
</h4></a>
{% if card.author_count > 1 %}
<p>
{{ card.first_author_norm }} et al., {{ card.year }}
</p>
{% else %}
<p>
{{ card.first_author_norm }}, {{ card.year }}
</p>
{% endif %}
</div>
{% endfor %}
<div
class=
"card-text"
>
<h4>
{{
count + 1 -
loop.index }})
<a
href=
"https://ui.adsabs.harvard.edu/abs/{{ card.bibcode }}/abstract"
>
{{ card.title }}
</h4></a>
{% if card.author_count > 1 %}
<p>
{{ card.first_author_norm }} et al., {{ card.year }}
</p>
{% else %}
<p>
{{ card.first_author_norm }}, {{ card.year }}
</p>
{% endif %}
</div>
{% endfor %}
</div>
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment