Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
w2pext
plugin_dbui
Commits
d4a47143
Commit
d4a47143
authored
14 years ago
by
Renaud Le Gac
Browse files
Options
Downloads
Patches
Plain Diff
First Idea to handle reports
parent
6b9a472e
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
controllers/reports.py
+38
-0
38 additions, 0 deletions
controllers/reports.py
views/reports/report_1.html
+23
-0
23 additions, 0 deletions
views/reports/report_1.html
with
61 additions
and
0 deletions
controllers/reports.py
0 → 100644
+
38
−
0
View file @
d4a47143
"""
$Id$
"""
def
index
():
"""
Main Controller handling report.
"""
return
'
Report section
'
def
report_1
():
"""
First trial
"""
# Resolve foreign key
query
=
db
.
publications
.
id_collaborations
==
db
.
collaborations
.
id
query
=
(
query
)
&
(
db
.
publications
.
id_publishers
==
db
.
publishers
.
id
)
query
=
(
query
)
&
(
db
.
publications
.
id_categories_aeres
==
db
.
categories_aeres
.
id
)
# publication with comite de lecture
query
=
(
query
)
&
(
db
.
publications
.
conference_title
==
''
)
query
=
(
query
)
&
((
db
.
categories_aeres
.
code
==
'
ACL
'
)
|
(
db
.
categories_aeres
.
code
==
'
ACLN
'
))
# Interrogate the database
rows
=
db
(
query
).
select
(
db
.
publications
.
title
,
db
.
publications
.
authors
,
db
.
collaborations
.
collaboration
,
db
.
publishers
.
abbreviation
,
db
.
publications
.
year
,
db
.
publications
.
doi
,
db
.
publications
.
volume
,
db
.
publications
.
first_page
,
db
.
publications
.
last_page
,
db
.
publications
.
conference_title
,
db
.
categories_aeres
.
code
)
return
{
'
title
'
:
'
Rapport 1
'
,
'
publis
'
:
rows
}
This diff is collapsed.
Click to expand it.
views/reports/report_1.html
0 → 100644
+
23
−
0
View file @
d4a47143
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=iso-8859-1"
>
<title>
{{=title}}
</title>
</head>
<body>
<h2>
Publications avec comité de lecture
</h2>
<ol>
{{for el in publis:}}
<li>
{{=el.publications.title}}
<br>
{{=el.publications.authors}}
<br>
{{if el.publishers.abbreviation:}}{{=el.publishers.abbreviation}}{{pass}}
{{if el.publications.volume:}}{{=el.publications.volume}}{{pass}}
{{if el.publications.year:}}({{=el.publications.year}}){{pass}}
{{if el.publications.first_page:}}{{=el.publications.first_page}}{{pass}}
{{if el.publications.last_page:}}- {{=el.publications.last_page}}{{pass}}
</li>
{{pass}}
</ol>
</body>
</html>
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