Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doi-landing-page
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alejandro De Maria Antolinos
doi-landing-page
Commits
974659eb
Commit
974659eb
authored
Dec 13, 2017
by
Maxime Chaillet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2
create page when doi is not found
parent
9b7ceca0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
4 deletions
+33
-4
Gruntfile.js
Gruntfile.js
+1
-1
css/doi.css
css/doi.css
+4
-0
min/doi-landing-page.min.js
min/doi-landing-page.min.js
+1
-1
min/output.min.css
min/output.min.css
+1
-1
min/precompiled.templates.min.js
min/precompiled.templates.min.js
+1
-0
src/doi.js
src/doi.js
+7
-1
templates/doi-not-found-page.js
templates/doi-not-found-page.js
+18
-0
No files found.
Gruntfile.js
View file @
974659eb
...
...
@@ -11,7 +11,7 @@ module.exports = function(grunt) {
},
watch
:
{
files
:
[
'
<%= jshint.files %>
'
,
'
templates/**js
'
],
tasks
:
[
'
uglify
'
,
'
dustjs
'
,
'
wiredep
'
]
tasks
:
[
'
uglify
'
,
'
dustjs
'
,
'
cssmin
'
,
'
wiredep
'
]
},
uglify
:
{
options
:
{
...
...
css/doi.css
View file @
974659eb
...
...
@@ -8,6 +8,10 @@
background-color
:
#132577
!important
;
}
.lightRedBackground
{
background-color
:
#ffcaca
!important
;
}
.grayBackground
{
background-color
:
#dcdee2
;
}
...
...
min/doi-landing-page.min.js
View file @
974659eb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
min/output.min.css
View file @
974659eb
.flex
{
display
:
flex
}
.blueBackground
{
background-color
:
#132577
!important
}
.grayBackground
{
background-color
:
#dcdee2
}
.whiteVCenteredFont
{
color
:
#fff
;
margin-top
:
auto
;
margin-bottom
:
auto
}
.btn
{
white-space
:
normal
}
.btn-primary
:hover
{
background-color
:
#5b5a78
;
border-color
:
#2b2a48
}
.btn-primary
{
border-color
:
#2b2a48
}
label
{
font-weight
:
700
}
#logo
{
height
:
50px
}
\ No newline at end of file
.flex
{
display
:
flex
}
.blueBackground
{
background-color
:
#132577
!important
}
.lightRedBackground
{
background-color
:
#ffcaca
!important
}
.grayBackground
{
background-color
:
#dcdee2
}
.whiteVCenteredFont
{
color
:
#fff
;
margin-top
:
auto
;
margin-bottom
:
auto
}
.btn
{
white-space
:
normal
}
.btn-primary
:hover
{
background-color
:
#5b5a78
;
border-color
:
#2b2a48
}
.btn-primary
{
border-color
:
#2b2a48
}
label
{
font-weight
:
700
}
#logo
{
height
:
50px
}
\ No newline at end of file
min/precompiled.templates.min.js
View file @
974659eb
(
function
(
dust
){
dust
.
register
(
"
doi-not-found-page
"
,
body_0
);
function
body_0
(
chk
,
ctx
){
return
chk
.
w
(
"
<div class=
\"
container-fluid
\"
><div class=
\"
row
\"
><div class=
\"
col-3
\"
> </div><div class=
\"
col-6 blueBackground text-center
\"
> <img src=
\"
./src/esrfLogo.png
\"
> </img> </div><div class=
\"
col-3
\"
> </div></div><div class=
\"
row
\"
><div class=
\"
col-12 text-center
\"
> <h2> Not found </h2> </div></div><div class=
\"
row
\"
><div class=
\"
col-3
\"
> </div><div class=
\"
col-6 lightRedBackground text-center
\"
> <p>
"
).
f
(
ctx
.
get
([
"
message
"
],
false
),
ctx
,
"
h
"
).
w
(
"
</p> </div><div class=
\"
col-3
\"
> </div></div></div>
"
);}
body_0
.
__dustBody
=!
0
;
return
body_0
}(
dust
));
(
function
(
dust
){
dust
.
register
(
"
esrf-landing-page
"
,
body_0
);
function
body_0
(
chk
,
ctx
){
return
chk
.
w
(
"
<div class=
\"
container-fluid
\"
><div class=
\"
row
\"
><div class=
\"
col-12 col-sm-4 blueBackground
\"
> <img id=
\"
logo
\"
src=
\"
./src/esrfLogo.png
\"
> </img> </div><div class=
\"
col-12 col-sm-8 blueBackground flex
\"
> <div class=
\"
col-12 whiteVCenteredFont text-right
\"
>
"
).
f
(
ctx
.
getPath
(
false
,
[
"
investigation
"
,
"
doi
"
]),
ctx
,
"
h
"
).
w
(
"
</div></div></div><div class=
\"
row
\"
><div class=
\"
col-8
\"
> <label>Title</label><p class=
\"
grayBackground
\"
>
"
).
f
(
ctx
.
getPath
(
false
,
[
"
investigation
"
,
"
summary
"
]),
ctx
,
"
h
"
).
w
(
"
</p><label> Abstract </label><p class=
\"
grayBackground
\"
> </p><p><label> Experimental report </label> <button type=
\"
button
\"
class=
\"
btn btn-primary btn-lg btn-block blueBackground disabled
\"
style='background-color:#D7D7D7; border:1px solid #D7D7D7;'>Download experimental report </button> </p><p><label> Download data </label><button type=
\"
button
\"
class=
\"
btn btn-primary btn-lg btn-block blueBackground disabled
\"
style='background-color:#D7D7D7; border:1px solid #D7D7D7;'>Download data </button></p></div><div class=
\"
col-4
\"
><div class=
\"
row
\"
> <div class=
\"
col-12
\"
><label> Identifier </label><p>
"
).
f
(
ctx
.
getPath
(
false
,
[
"
investigation
"
,
"
id
"
]),
ctx
,
"
h
"
).
w
(
"
</p><label> Authors </label>
"
).
s
(
ctx
.
getPath
(
false
,
[
"
investigation
"
,
"
investigationUsers
"
]),
ctx
,{
"
block
"
:
body_1
},{}).
w
(
"
<label> Publisher </label><p> ESRF </p><label> Publication year </label><p> year </p><label> Proposal number </label><p>
"
).
f
(
ctx
.
getPath
(
false
,
[
"
investigation
"
,
"
name
"
]),
ctx
,
"
h
"
).
w
(
"
</p>
\t
</div></div></div></div></div>
"
);}
body_0
.
__dustBody
=!
0
;
function
body_1
(
chk
,
ctx
){
return
chk
.
h
(
"
eq
"
,
ctx
,{
"
block
"
:
body_2
},{
"
key
"
:
ctx
.
get
([
"
role
"
],
false
),
"
value
"
:
"
Principal investigator
"
},
"
h
"
).
h
(
"
eq
"
,
ctx
,{
"
block
"
:
body_3
},{
"
key
"
:
ctx
.
get
([
"
role
"
],
false
),
"
value
"
:
"
Proposal scientist
"
},
"
h
"
);}
body_1
.
__dustBody
=!
0
;
function
body_2
(
chk
,
ctx
){
return
chk
.
w
(
"
<p>
"
).
f
(
ctx
.
getPath
(
true
,
[
"
user
"
,
"
fullName
"
]),
ctx
,
"
h
"
).
w
(
"
</p>
"
);}
body_2
.
__dustBody
=!
0
;
function
body_3
(
chk
,
ctx
){
return
chk
.
w
(
"
<p>
"
).
f
(
ctx
.
getPath
(
true
,
[
"
user
"
,
"
fullName
"
]),
ctx
,
"
h
"
).
w
(
"
</p>
"
);}
body_3
.
__dustBody
=!
0
;
return
body_0
}(
dust
));
\ No newline at end of file
src/doi.js
View file @
974659eb
...
...
@@ -62,7 +62,13 @@ ICATClient.prototype.getByDOI = function(doi){
});
}
else
{
alert
(
"
The DOI number
"
+
doi
+
"
was not found !
"
);
dust
.
render
(
'
doi-not-found-page
'
,
{
message
:
"
Sorry, the requested DOI was not found.
"
},
function
(
err
,
out
)
{
$
(
"
#main
"
).
html
(
out
);
});
}
},
// Code to run if the request fails
...
...
templates/doi-not-found-page.js
0 → 100644
View file @
974659eb
<
div
class
=
"
container-fluid
"
>
<
div
class
=
"
row
"
>
<
div
class
=
"
col-3
"
>
<
/div
>
<
div
class
=
"
col-6 blueBackground text-center
"
>
<
img
src
=
"
./src/esrfLogo.png
"
>
<
/img> </
div
>
<
div
class
=
"
col-3
"
>
<
/div
>
<
/div
>
<
div
class
=
"
row
"
>
<
div
class
=
"
col-12 text-center
"
>
<
h2
>
Not
found
<
/h2> </
div
>
<
/div
>
<
div
class
=
"
row
"
>
<
div
class
=
"
col-3
"
>
<
/div
>
<
div
class
=
"
col-6 lightRedBackground text-center
"
>
<
p
>
{
message
}
<
/p> </
div
>
<
div
class
=
"
col-3
"
>
<
/div
>
<
/div
>
<
/div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment