Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
david Chavalarias
clinicaltrials
Commits
446d8cf5
Commit
446d8cf5
authored
Feb 03, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
claim_profile page layout and visiting card layout
parent
c3d79cbf
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
462 additions
and
292 deletions
+462
-292
explorerjs.html
explorerjs.html
+1
-0
extractDataCustom.py
services/db_to_tina_api/extractDataCustom.py
+36
-3
main.py
services/main.py
+6
-4
comex.css
static/css/comex.css
+71
-6
comex_user.css
static/css/comex_user.css
+54
-18
custom.css
static/explorerlibs/css2/custom.css
+32
-17
comex_page_claim_profile_controllers.js
static/js/comex_page_claim_profile_controllers.js
+15
-9
methods.js
static/tinawebJS/methods.js
+3
-5
claim_profile.html
templates/claim_profile.html
+244
-230
No files found.
explorerjs.html
View file @
446d8cf5
...
...
@@ -14,6 +14,7 @@
<link
rel=
"stylesheet"
href=
"static/explorerlibs/css2/sidebar.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"static/explorerlibs/bootswatch/css/bootswatch.css"
>
<link
rel=
"stylesheet"
href=
"static/explorerlibs/css2/font.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"static/css/comex.css"
type=
"text/css"
>
<style>
.sigma_labels_canvas
{
...
...
services/db_to_tina_api/extractDataCustom.py
View file @
446d8cf5
...
...
@@ -604,16 +604,47 @@ class MyExtractor:
else
:
color
=
'78,193,127'
# content is an instance of #information.our-vcard
# --------------------------------------------------
# <img src="....">
# <ul>
# <li class=bigger>
# <b>{{ hon_title }}
# {{ first_name }}
# {{ mid_initials }}
# {{ last_name }}</b>
# <br/>
# <br/>
# </li>
# <li>
# <b>Country: </b>{{ country }}<br>
# <b>Position: </b>{{ position }}<br>
# <b>Keywords: </b>{{ keywords }}<br>
# [ <a href="{{ info.home_url }}" target="blank">
# View homepage
# </a>]
# <br>
# </li>
# </ul>
content
=
""
pic_src
=
self
.
scholars
[
idNode
][
'pic_src'
]
# pic in vcard
pic_src
=
self
.
scholars
[
idNode
][
'pic_src'
]
if
pic_src
and
pic_src
!=
""
:
content
+=
'<img src="'
+
pic_src
+
'" width='
+
str
(
self
.
imsize
)
+
'px
style=float:left;margin:5px
>'
;
content
+=
'<img src="'
+
pic_src
+
'" width='
+
str
(
self
.
imsize
)
+
'px>'
;
else
:
if
len
(
self
.
scholars
)
<
2000
:
im_id
=
int
(
floor
(
randint
(
0
,
11
)))
content
+=
'<img src="static/img/'
+
str
(
im_id
)
+
'.png" width='
+
str
(
self
.
imsize
)
+
'px style=float:left;margin:5px>'
content
+=
'<img src="static/img/'
+
str
(
im_id
)
+
'.png" width='
+
str
(
self
.
imsize
)
+
'px>'
# label in vcard
content
+=
'<p class=bigger><b>'
+
nodeLabel
+
'</b></p>'
# other infos in vcard
content
+=
'<p>'
content
+=
'<b>Country: </b>'
+
self
.
scholars
[
idNode
][
'country'
]
+
'</br>'
if
self
.
scholars
[
idNode
][
'position'
]
and
self
.
scholars
[
idNode
][
'position'
]
!=
""
:
...
...
@@ -639,6 +670,8 @@ class MyExtractor:
content
+=
'[ <a href='
+
self
.
scholars
[
idNode
][
'home_url'
]
.
replace
(
"&"
,
" and "
)
+
' target=blank > View homepage </a >]<br/>'
content
+=
'</p>'
node
=
{}
node
[
"type"
]
=
"Document"
node
[
"label"
]
=
nodeLabel
...
...
services/main.py
View file @
446d8cf5
...
...
@@ -473,7 +473,6 @@ def claim_profile():
# identify who came back from the return token
if
'token'
in
request
.
args
:
return_token
=
sanitize
(
request
.
args
[
'token'
])
print
(
"clean token"
,
return_token
)
...
...
@@ -490,12 +489,15 @@ def claim_profile():
# claim failure cases
if
return_token
is
None
or
luid
is
None
or
return_user
is
None
:
mlog
(
'INFO'
,
'failed claim profile attempt with return_token=
%
s, luid=
%
s'
%
str
(
return_token
),
str
(
luid
))
mlog
(
'INFO'
,
'failed claim profile attempt with return_token=
%
s, luid=
%
s'
%
(
str
(
return_token
),
str
(
luid
)
))
return
render_template
(
"message.html"
,
message
=
"""
This is not the correct link. Don't attempt to claim a profile that is not yours.
"""
This is not the correct link. If you're trying to register to an old profile, please simply click on the link in the email you received.
<br/>
<br/>
Otherwise you can simply register via <span class='code'><a href="
%
s">
%
s</a></span>
"""
%
(
url_for
(
'register'
),
url_for
(
'register'
))
)
# claim success
...
...
static/css/comex.css
View file @
446d8cf5
...
...
@@ -65,6 +65,10 @@ div.my-box {
-webkit-transition
:
opacity
.2s
ease-out
;
}
.panel-body
{
padding
:
5px
15px
;
}
/* for intro text */
.mini-hero
{
margin-top
:
5px
;
...
...
@@ -83,6 +87,11 @@ div.my-box {
/*text-align: center;*/
}
#information-example
{
}
/* self-made modals */
.modal.self-made
{
top
:
25%
;
...
...
@@ -190,22 +199,41 @@ div.my-box {
margin-top
:
-.5em
;
}
/* big categories */
h2
.cat
{
font-size
:
24px
;
font-family
:
"Droid Sans"
,
Calibri
,
Ubuntu
,
sans-serif
;
padding-top
:
1em
;
font-weight
:
bold
;
color
:
#910
;
}
h2
.catfirst
{
font-size
:
24px
;
margin-top
:
.2em
;
font-weight
:
bold
;
color
:
#910
;
}
/* page sections: style snippets from old bootstrap h2 */
h2
.oldstyle
{
font-size
:
2
6
px
;
font-family
:
"Droid Sans"
,
Calibri
,
Ubuntu
,
sans-serif
;
font-size
:
2
4
px
;
font-family
:
Ubuntu
,
sans-serif
;
font-weight
:
bold
;
}
@media
(
max-width
:
768px
){
/* sm */
h2
.oldstyle
{
h2
.
cat
,
h2
.
oldstyle
{
font-size
:
22px
!important
;
}
}
@media
(
max-width
:
544px
){
/* xs */
h2
.oldstyle
{
h2
.
cat
,
h2
.
oldstyle
{
font-size
:
16px
!important
;
}
}
...
...
@@ -215,7 +243,9 @@ h2.oldstyle {
div
.ccsection-wrap
{
margin
:
0
;
padding
:
0
;
border
:
none
;
background-color
:
transparent
;
max-width
:
62em
;
/* must be > FORMWIDTH */
}
a
.ccsection-toggle
{
margin
:
0
;
...
...
@@ -224,6 +254,20 @@ a.ccsection-toggle {
a
.ccsection-toggle
:hover
,
a
.ccsection-toggle
:focus
{
text-decoration
:
none
;
}
h2
.ccsection
{
padding-top
:
1em
;
font-size
:
1.5em
;
font-family
:
"Droid Sans"
,
Calibri
,
Ubuntu
,
sans-serif
;
font-weight
:
bold
;
}
/* uform with bg has already enough padding */
/*uform > h2.ccsection {
padding: 0;
margin: 0
}*/
.ccsection-toggle
h2
.ccsection
,
.ccsection-toggle
:focus
h2
.ccsection
{
color
:
#333
;
/* passive: like normal body color */
}
...
...
@@ -244,7 +288,7 @@ div.ccsection-heading {
div
.ccsection-uform-body
{
background-color
:
#ddd
;
border-radius
:
0
;
padding
:
15px
30px
53px
30
px
;
padding
:
5px
15px
20px
15
px
;
}
div
.ccsection-footer
{
...
...
@@ -255,9 +299,30 @@ div.ccsection-footer {
/**/
/*
"carte de visite"
*/
.our-vcard
{
line-height
:
110%
;
background-color
:
#fff
;
border-radius
:
.3em
;
padding
:
2em
1em
.3em
1em
;
margin
:
2em
;
border
:
2px
solid
#555
;
max-width
:
35em
;
}
.our-vcard
img
{
float
:
left
;
width
:
90px
;
position
:
relative
;
margin
:
-7px
10px
5px
5px
;
}
.our-vcard
ul
{
list-style
:
none
;
}
/**/
.bigger
{
font-size
:
150%
;
}
...
...
static/css/comex_user.css
View file @
446d8cf5
...
...
@@ -2,10 +2,25 @@
/* form content for reg, profile, login, etc.... */
div
.uform
{
padding
:
15px
30px
53px
30px
;
margin
:
38px
38px
8px
38px
;
/*padding: 15px 30px 53px 30px;*/
padding
:
0px
5px
3px
5px
;
margin
:
7px
5px
3px
5px
;
background-color
:
#ddd
;
max-width
:
950px
;
max-width
:
57em
;
/* FORMWIDTH */
}
/* form content for reg, profile, login, etc.... */
div
.uform-white
{
padding
:
0px
5px
3px
5px
;
margin
:
7px
5px
3px
5px
;
background-color
:
#fff
;
max-width
:
57em
;
/* FORMWIDTH */
border-radius
:
5px
;
}
div
.uform-white
.ccsection-heading
,
div
.uform-white
.ccsection-uform-body
{
background-color
:
#fff
;
}
/*div.uform::before {
...
...
@@ -16,17 +31,40 @@ div.uform {
color: #000;
}*/
/* same but to put a panel-body inside */
/* same but
no margin and no color: good
to put a panel-body inside */
div
.uform-nobg
{
margin
:
38px
38px
8px
38px
;
max-width
:
900px
;
max-width
:
57em
;
/* FORMWIDTH */
}
.uform.readonly
input
,
.uform.readonly
label
,
.uform-white.readonly
input
,
.uform-white.readonly
label
{
color
:
#888
;
}
.uform.readonly
.tagbox-container
,
.uform-white.readonly
.tagbox-container
{
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
}
.uform.readonly
.tagbox-container
input
,
.uform-white.readonly
.tagbox-container
input
{
display
:
none
;
}
.uform.readonly
.tagbox-container
label
,
.uform-white.readonly
.tagbox-container
label
{
border-top
:
none
;
border-left
:
none
;
border-bottom
:
none
;
border-right
:
1px
solid
#ccc
;
;
}
@media
(
max-width
:
991px
){
/* sm and md */
div
.uform
,
div
.uform-nobg
{
padding
:
0
;
margin
:
12px
12px
2px
12
px
;
margin
:
5px
0px
0px
5
px
;
}
}
...
...
@@ -54,8 +92,13 @@ p#doors_ret_msg {
border-radius
:
2em
;
padding
:
1em
3em
;
text-align
:
center
;
max-width
:
57em
;
}
/* ex: profile overview in readonly */
.readonly.panel-body
{
background-color
:
#ddd
;
}
/* a fixed div for validation messsages */
.menu-right-fixed
{
...
...
@@ -78,7 +121,7 @@ p#doors_ret_msg {
.question
{
padding
:
0
1em
;
margin-bottom
:
2em
;
max-width
:
5
2
em
;
/* FORMWIDTH */
max-width
:
5
7
em
;
/* FORMWIDTH */
}
@media
(
max-width
:
991px
){
...
...
@@ -175,24 +218,17 @@ input.readonly {
border-bottom
:
3px
solid
#ccc
;
}
/* collapsible sections */
h2
.ccsection
{
padding-top
:
1em
;
font-size
:
1.5em
;
font-family
:
"Droid Sans"
,
Calibri
,
Ubuntu
,
sans-serif
;
font-weight
:
bold
;
}
/*
big
categories: like form sections etc. */
/*
form
categories: like form sections etc. */
h3
.formcat
{
font-size
:
20
px
;
font-size
:
16
px
;
padding-top
:
1em
;
font-weight
:
bold
;
color
:
#910
;
}
h3
.formcatfirst
{
font-size
:
20
px
;
font-size
:
16
px
;
margin-top
:
.2em
;
font-weight
:
bold
;
color
:
#910
;
...
...
static/explorerlibs/css2/custom.css
View file @
446d8cf5
...
...
@@ -2,17 +2,17 @@
.loader
{
text-align
:
center
;
transform
:
translate
(
0
,
50%
)
!important
;
-ms-transform
:
translate
(
0
,
50%
)
!important
;
/*IE 9*/
-ms-transform
:
translate
(
0
,
50%
)
!important
;
/*IE 9*/
-webkit-transform
:
translate
(
0
,
50%
)
!important
;
/*Safari and Chrome */
}
.navbar
{
.navbar
{
margin-bottom
:
1px
;
}
#defaultop
{
#defaultop
{
min-height
:
5%
;
max-height
:
10%
;
}
...
...
@@ -60,10 +60,10 @@
/*.selection-item{
display:inline-block;
border:solid 1px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-khtml-border-radius: 6px;'+
border-color:#BDBDBD;
border-color:#BDBDBD;
padding:0px 2px 0px 2px;
margin:1px 0px 1px 0px;
cursor: pointer;
...
...
@@ -90,10 +90,10 @@
display
:
inline-block
;
border
:
solid
1px
;
/*box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.3); */
-moz-border-radius
:
6px
;
-webkit-border-radius
:
6px
;
-moz-border-radius
:
6px
;
-webkit-border-radius
:
6px
;
-khtml-border-radius
:
6px
;
'+
border-color
:
#BDBDBD
;
border-color
:
#BDBDBD
;
padding
:
0px
2px
0px
2px
;
margin
:
1px
0px
1px
0px
;
cursor
:
pointer
;
...
...
@@ -122,7 +122,7 @@
}
.gradient
{
background-color
:
#f0f0f8
;
background-color
:
#f0f0f8
;
background-image
:
-webkit-radial-gradient
(
#ffffff
,
#d8d8e0
);
background-image
:
-moz-radial-gradient
(
#ffffff
,
#d8d8e0
);
/*background-color: #434343;*/
/*background-image: linear-gradient(#434343, #282828);*/
...
...
@@ -261,19 +261,34 @@
}
#tips
ul
{
/*list-style:none;*/
padding-left
:
10%
;
padding-left
:
10%
;
}
/* "carte de visite" */
#information
{
font-size
:
80%
;
}
line-height
:
110%
;
background-color
:
#fff
;
border-radius
:
.3em
;
padding
:
2em
1em
.3em
1em
;
margin
:
2em
;
border
:
2px
solid
#555
;
max-width
:
35em
;
}
#information
img
{
clear
:
both
width
:
90px
;
position
:
relative
;
top
:
-7px
;
right
:
10px
;
}
#information
ul
{
list-style
:
none
;
padding-left
:
5%
;
}
list-style
:
none
;
}
.btn-sm
:hover
{
font-weight
:
bold
;
...
...
@@ -287,4 +302,4 @@
.tab.active
{
background
:
#fff
;
padding-top
:
6px
;
position
:
relative
;
top
:
1px
;
border-color
:
#666
;
}
.tab
a
.active
{
font-weight
:
bold
;
}
.tab-container
.panel-container
{
background
:
#fff
;
border
:
solid
#666
1px
;
padding
:
10px
;
-moz-border-radius
:
0
4px
4px
4px
;
-webkit-border-radius
:
0
4px
4px
4px
;
}
.panel-container
{
margin-bottom
:
10px
;
}
\ No newline at end of file
.panel-container
{
margin-bottom
:
10px
;
}
static/js/comex_page_claim_profile_controllers.js
View file @
446d8cf5
...
...
@@ -25,6 +25,7 @@ function selectSavedMenus(uinfo) {
if
(
colType
==
'm'
)
{
var
colName
=
cmxClt
.
COLS
[
i
][
0
]
var
chosenV
=
uinfo
[
colName
]
console
.
log
(
"..selectSavedMenus"
,
colName
,
chosenV
)
var
selectElt
=
document
.
getElementById
(
colName
)
if
(
selectElt
)
{
var
myOption
=
selectElt
.
querySelector
(
`option[value="
${
chosenV
}
"]`
)
...
...
@@ -42,6 +43,19 @@ function selectSavedMenus(uinfo) {
}
}
// the contents are conditioned on what return_user had in his info
var
presentMtis
=
[]
if
(
uinfo
.
keywords
.
length
)
{
presentMtis
.
push
(
{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
}
)
}
if
(
uinfo
.
hashtags
.
length
)
{
presentMtis
.
push
(
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'color'
:
"#23A"
}
)
}
// initialize form controllers
var
theUForm
=
cmxClt
.
uform
.
Form
(
...
...
@@ -50,17 +64,9 @@ var theUForm = cmxClt.uform.Form(
// onkeyup function
null
,
// other params
{
'multiTextinputs'
:
[{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
},
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'color'
:
"#23A"
}]
}
{
'multiTextinputs'
:
presentMtis
}
)
var
deleteUser
=
document
.
getElementById
(
'delete_user'
)
deleteUser
.
checked
=
false
selectSavedMenus
(
uinfo
)
// memory
...
...
static/tinawebJS/methods.js
View file @
446d8cf5
...
...
@@ -399,13 +399,13 @@ function htmlfied_nodesatts(elems){
socnodes
.
push
(
information
);
}
else
{
if
(
node
.
type
==
catSoc
){
information
+=
'<li><b>'
+
node
.
label
+
'</b></li>'
;
if
(
node
.
htmlCont
==
""
){
information
+=
'<li><b>'
+
node
.
label
+
'</b></li>'
;
if
(
!
isUndef
(
node
.
level
))
{
information
+=
'<li>'
+
node
.
level
+
'</li>'
;
}
}
else
{
information
+=
'<li>'
+
$
(
"<div/>"
).
html
(
node
.
htmlCont
).
text
()
+
'</li>'
;
information
+=
$
(
"<div/>"
).
html
(
node
.
htmlCont
).
text
()
;
}
socnodes
.
push
(
information
)
}
...
...
@@ -451,9 +451,7 @@ function updateLeftPanel_fix() {
// getTopPapers("semantic");
informationDIV
+=
'<br><h4>Information:</h4><ul>'
;
informationDIV
+=
htmlfied_nodesatts
(
getNodeIDs
(
selections
)
).
join
(
"<br>
\n
"
)
informationDIV
+=
'</ul><br>'
;
informationDIV
=
htmlfied_nodesatts
(
getNodeIDs
(
selections
)
).
join
(
"<br>
\n
"
)
//using the readmore.js
// ive put a limit for nodes-name div
...
...
templates/claim_profile.html
View file @
446d8cf5
This diff is collapsed.
Click to expand it.
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