80 lines
1.2 KiB
XML
80 lines
1.2 KiB
XML
{% if get_user() %}
|
|
{
|
|
"widgettype":"HBox",
|
|
"options":{
|
|
"css":"clickable",
|
|
"cwidth":10
|
|
},
|
|
"binds":[
|
|
{
|
|
"wid":"self",
|
|
"event":"click",
|
|
"actiontype":"urlwidget",
|
|
"popup_options":{
|
|
"eventpos":true,
|
|
"dismiss_events":["command"]
|
|
},
|
|
"target":"Popup",
|
|
"options":{
|
|
"url":"{{entire_url('user_menu.ui')}}"
|
|
}
|
|
}
|
|
],
|
|
"subwidgets":[
|
|
{
|
|
"widgettype":"Icon",
|
|
"options":{
|
|
"url":"{{entire_url('/imgs/people.png')}}",
|
|
"rate":1.5
|
|
}
|
|
},
|
|
{
|
|
"widgettype":"Text",
|
|
"options":{
|
|
"wrap":false,
|
|
"text":"{{get_username()}}({{str(get_user_roles(get_user()))}})"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
{% else %}
|
|
{
|
|
"widgettype":"IconBar",
|
|
"options":{
|
|
"css":"filler",
|
|
"tools":[
|
|
{
|
|
"name":"login",
|
|
"tip":"user login",
|
|
"icon":"{{entire_url('/imgs/login.png')}}"
|
|
},
|
|
{
|
|
"name":"register",
|
|
"tip":"user register",
|
|
"icon":"{{entire_url('/imgs/register.png')}}"
|
|
}
|
|
]
|
|
},
|
|
"binds":[
|
|
{
|
|
"wid":"self",
|
|
"event":"login",
|
|
"actiontype":"urlwidget",
|
|
"target":"self",
|
|
"options":{
|
|
"url":"{{entire_url('login.ui')}}"
|
|
}
|
|
},
|
|
{
|
|
"wid":"self",
|
|
"event":"register",
|
|
"actiontype":"urlwidget",
|
|
"target":"self",
|
|
"options":{
|
|
"url":"{{entire_url('register.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
{% endif %}
|