{% set roles = get_user_roles(get_user()) %} {% set role_str = roles|join(',') %} {% set is_customer = 'customer.' in role_str %} {% set is_admin = 'owner.superuser' in roles or 'reseller.operator' in roles %} { "widgettype": "HBox", "options": { "width": "100%", "height": "100%", "spacing": 0 }, "subwidgets": [ { "widgettype": "VScrollPanel", "options": { "cwidth": 9, "bgcolor": "#1e293b" }, "subwidgets": [ { "widgettype": "VBox", "options": { "padding": "16px", "spacing": 8 }, "subwidgets": [ { "widgettype": "Title5", "options": { "text": "็œŸไบบ็ด ๆ", "color": "#94a3b8" } } {% if is_customer or is_admin %} ,{ "widgettype": "Button", "options": { "label": "๐Ÿ” ็œŸไบบ่ฎค่ฏ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('create_validate.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ“ค ไธŠไผ ็ด ๆ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('upload_asset.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ–ผ๏ธ ๆŸฅ็œ‹็ด ๆ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('view_assets.ui')}}" }, "mode": "replace" } ] } {% endif %} ,{ "widgettype": "VBox", "options": { "padding": "12px 0 8px", "spacing": 0 }, "subwidgets": [ { "widgettype": "Title5", "options": { "text": "่™šๆ‹Ÿไบบ็ด ๆ", "color": "#94a3b8" } } ] } {% if is_customer or is_admin %} ,{ "widgettype": "Button", "options": { "label": "๐Ÿ“ ๅˆ›ๅปบ็ด ๆ็ป„ๅˆ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('virtual_create_group.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ“ค ไธŠไผ ่™šๆ‹Ÿไบบ็ด ๆ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('virtual_upload_asset.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ–ผ๏ธ ๆŸฅ็œ‹่™šๆ‹Ÿไบบ็ด ๆ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('virtual_view_assets.ui')}}" }, "mode": "replace" } ] } {% endif %} {% if is_admin %} ,{ "widgettype": "VBox", "options": { "padding": "12px 0 8px", "spacing": 0 }, "subwidgets": [ { "widgettype": "Title5", "options": { "text": "็ฎก็†ๅŠŸ่ƒฝ", "color": "#94a3b8" } } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ“ ็ด ๆ็ป„ๅˆ็ฎก็†", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('group_manage.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ–ผ๏ธ ็ด ๆ่ต„ไบง็ฎก็†", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('asset_manage.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "โš™๏ธ ไพ›ๅบ”ๅ•†้…็ฝฎ", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('vendor_config_manage.ui')}}" }, "mode": "replace" } ] }, { "widgettype": "Button", "options": { "label": "๐Ÿ”— ๆœบๆž„ๆ˜ ๅฐ„็ฎก็†", "width": "100%", "textAlign": "left" }, "binds": [ { "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rl_content", "options": { "url": "{{entire_url('org_group_manage.ui')}}" }, "mode": "replace" } ] } {% endif %} ] } ] }, { "widgettype": "VBox", "options": { "css": "filler", "padding": "20px" }, "subwidgets": [ { "widgettype": "VScrollPanel", "options": { "css": "filler" }, "subwidgets": [ { "widgettype": "VBox", "id": "rl_content", "options": { "width": "100%" } } ] } ] } ] }