first commit
This commit is contained in:
187
templates/base.html
Executable file
187
templates/base.html
Executable file
@@ -0,0 +1,187 @@
|
||||
{% from "menu.html" import menu, left, menu_sub with context %}
|
||||
{% import "macro.html" as macros %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="ko">
|
||||
{% block head %}
|
||||
<title>{{get_web_title()}}</title>
|
||||
{% endblock %}
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
|
||||
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.ico') }}">
|
||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
{% set theme = get_theme() %}
|
||||
<link href="{{ url_for('static', filename='css/theme/'+theme[0]+'_bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/animate.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ url_for('static', filename='css/custom.css') }}" rel="stylesheet">
|
||||
<link href="https://unpkg.com/balloon-css/balloon.min.css" rel="stylesheet">
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<!--<script src="{{ url_for('static', filename='js/popper.min.js') }}"></script>-->
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap-notify.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/custom10.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/sjva_ui14.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/sjva_util1.js') }}"></script>
|
||||
|
||||
|
||||
{# <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.6/socket.io.js"></script>#}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.1/socket.io.js" integrity="sha512-MgkNs0gNdrnOM7k+0L+wgiRc5aLgl74sJQKbIWegVIMvVGPc1+gc1L2oK9Wf/D9pq58eqIJAxOonYPVE5UwUFA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- 토글 -->
|
||||
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.4.0/css/bootstrap4-toggle.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.4.0/js/bootstrap4-toggle.min.js"></script>
|
||||
<!-- end 토글 -->
|
||||
|
||||
<style type="text/css">
|
||||
body { padding-top: {{theme[1]}}px; font-size: .850rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="body ">
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="large_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="modal_title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_body" style="word-break:break-all;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="normal_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="normal_modal_title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="normal_modal_body" style="word-break:break-all;">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
<!--<button type="button" class="btn btn-primary">Save changes</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="confirm_modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 id="confirm_title" class="modal-title">Modal title</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="confirm_body" class="modal-body">
|
||||
<p>Modal body text goes here.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="confirm_button" type="button" class="btn btn-primary" data-dismiss="modal">확인</button>
|
||||
<button id="confirm_cancel_button" type="button" class="btn btn-secondary" data-dismiss="modal">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 경로 선택 모달 -->
|
||||
<div class="modal fade" id="select_local_file_modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="select_local_file_modal_title">경로 선택</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_body" style="word-break: break-all;">
|
||||
<div class="row" style="padding-top: 10px; padding-bottom:10px; align-items: center;">
|
||||
<div class="col-sm-1 set-left"><strong>Path</strong></div>
|
||||
<div class="col-sm-11">
|
||||
<div class="input-group col-sm-12">
|
||||
<input id="select_local_file_modal_path" name="select_local_file_modal_path" type="text" class="form-control form-control-sm" value="/">
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
<button id="global_select_local_file_load_btn" class="btn btn-sm btn-outline-success">Load</button>
|
||||
<button type="button" id='select_local_file_modal_confirm_btn' class="btn btn-success" data-dismiss="modal">선택
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-left:20px; padding-top:5px;"><em>입력한 경로를 불러옵니다.</em></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="select_local_file_modal_only_dir" value="true" />
|
||||
<input type="hidden" id="select_local_file_modal_callback" value="" />
|
||||
<div class="list-group" id="select_local_file_modal_list_group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" id='select_local_file_modal_confirm_btn' class="btn btn-success" data-dismiss="modal">선택
|
||||
</button>
|
||||
<button type="button" id='select_local_file_modal_cancel_btn' class="btn btn-default" data-dismiss="modal">닫기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 예고편 Player Modal: START -->
|
||||
<div class="modal fade" id="video_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="video_modal_title" style="word-break:break-all;">예고편 재생: </h4>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_body" style="word-break:break-all;">
|
||||
<span id="video_player_body"></span>
|
||||
</div>
|
||||
<!--</div>-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" id='video_close_btn' class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 예고편 Player Modal: END -->
|
||||
|
||||
|
||||
<!--command modal-->
|
||||
{{ macros.m_modal_start('command_modal', '', 'modal-lg') }}
|
||||
<div>
|
||||
<textarea id="command_modal_textarea" class="col-md-12" rows="30" disabled style="visibility:visible"></textarea>
|
||||
</div>
|
||||
{{ macros.m_modal_end() }}
|
||||
<!--command modal end-->
|
||||
<!-- Modal end -->
|
||||
|
||||
|
||||
{{ menu() }}
|
||||
|
||||
<!--<nav class="navbar " role="navigation"> width가 메뉴만큼-->
|
||||
{{ left() }}
|
||||
{% block wide_menu %}{% endblock %}
|
||||
<!--</nav>-->
|
||||
<main id="main_container" role="main" class="container">
|
||||
|
||||
<div class="d-inline-block"></div>
|
||||
{{ menu_sub() }}
|
||||
<div>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
<div class="loading" id="loading">
|
||||
<img src="/static/img/loading.gif" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script src="{{ url_for('static', filename='js/sjva_global1.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
67
templates/login.html
Executable file
67
templates/login.html
Executable file
@@ -0,0 +1,67 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="login-form col-sm-4 border">
|
||||
<!--<form action="/login" method="post" _lpchecked="1">
|
||||
-->
|
||||
<form id="login_form">
|
||||
<input type="hidden" id="next" name="next" value="{{next}}">
|
||||
<h2 class="text-center">Log in</h2>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-user"></i></span>
|
||||
<input type="text" class="form-control" name="username" placeholder="Username" required="required" autocomplete="off" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" class="form-control" name="password" placeholder="Password" required="required" autocomplete="off" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button id="login_btn" type="submit" class="btn btn-primary login-btn btn-block">Sign in</button>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<label class="pull-left checkbox-inline"><input type="checkbox" name='remember' checked> Remember me</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-4"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#login_btn").click(function(e) {
|
||||
e.preventDefault();
|
||||
formData = get_formdata('#login_form')
|
||||
|
||||
$.ajax({
|
||||
url: '/login',
|
||||
type: "POST",
|
||||
cache: false,
|
||||
data:formData,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data == 'redirect') {
|
||||
next = document.getElementById("next").value;
|
||||
if (next == 'None' || next == '/system/restart') {
|
||||
next = '/'
|
||||
}
|
||||
window.location.href = next;
|
||||
} else if (data == 'no_id') {
|
||||
$.notify('<strong>ID가 없습니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
} else if (data == 'wrong_password') {
|
||||
$.notify('<strong>암호가 틀립니다.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
673
templates/macro.html
Executable file
673
templates/macro.html
Executable file
@@ -0,0 +1,673 @@
|
||||
{% macro setting_top(left='', padding='10') %}
|
||||
<div class='row' style="padding-top: {{padding}}px; padding-bottom:{{padding}}px; align-items: center;">
|
||||
<div class='col-sm-3 set-left'>
|
||||
{% if left != '' %}
|
||||
<strong>{{ left }}</strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class='col-sm-9'>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_bottom(desc=None, padding_top='5') %}
|
||||
{% if desc is not none %}
|
||||
<div style="padding-left:20px; padding-top:{{padding_top}}px;">
|
||||
<em>
|
||||
{% if desc is string %}
|
||||
{{ desc }}
|
||||
{% elif desc is iterable %}
|
||||
{% for d in desc %}
|
||||
{{ d }}<br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_input_int(id, left, value='', min='', max='', placeholder='', desc=None) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
<input id="{{ id }}" name="{{ id }}" type="number" class="form-control form-control-sm"
|
||||
{% if min != '' %}
|
||||
min="{{ min }}"
|
||||
{% endif %}
|
||||
{% if max != '' %}
|
||||
max="{{ max }}"
|
||||
{% endif %}
|
||||
{% if placeholder != '' %}
|
||||
placeholder="{{ placeholder }}"
|
||||
{% endif %}
|
||||
value="{{ value }}">
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_input_text(id, left, value='', col='9', placeholder='', desc='', type='text', disabled=False) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-{{ col }}">
|
||||
<input id="{{ id }}" name="{{ id }}" type="{{ type }}" class="form-control form-control-sm"
|
||||
{% if placeholder != '' %}
|
||||
placeholder="{{ placeholder }}"
|
||||
{% endif %}
|
||||
value="{{ value }}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 토글버튼형식 -->
|
||||
{% macro setting_checkbox(id, left, value, desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if value == 'True' or value == 'true' or value == 'On' %}
|
||||
<input id="{{ id }}" name="{{ id }}" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="{{ id }}" name="{{ id }}" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 일반적인 체크박스 -->
|
||||
{% macro setting_default_checkbox(id, left, label, value, desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-9">
|
||||
<div class="form-check">
|
||||
{% if value == 'True' or value == 'true' or value == 'On' %}
|
||||
<input type="checkbox" class="form-check-input" id="{{ id }}" name="{{ id }}" checked>
|
||||
{% else %}
|
||||
<input type="checkbox" class="form-check-input" id="{{ id }}" name="{{ id }}">
|
||||
{% endif %}
|
||||
<label class="form-check-label" for="{{ id }}">{{ label }}</label>
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 스케쥴러 스위치 체크박스 전용-->
|
||||
{% macro setting_scheduler_switch(left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지'], is_include='False', is_running='False') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
<input id="scheduler_swtich_btn" name="scheduler_swtich_btn" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="scheduler_swtich_btn" name="scheduler_swtich_btn" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- 일반 텍스트 -->
|
||||
{% macro info_text(id, left, value='', desc=None) %}
|
||||
{{ setting_top(left) }}
|
||||
<div style="padding-left:20px; padding-top:-5px;">
|
||||
<span id={{id}}>{{value}}</span>
|
||||
</div>
|
||||
{{ setting_bottom(desc, padding_top='-5') }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_text_go(id, left, value='', desc=None) %}
|
||||
{{ setting_top(left) }}
|
||||
<div style="padding-left:20px; padding-top:-5px;">
|
||||
<span id={{id}}><a href="{{value}}" target="_blank">{{value}}</a></span>
|
||||
</div>
|
||||
{{ setting_bottom(desc, padding_top='-5') }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_text_go_button(id, left, buttons, value='', desc=None) %}
|
||||
{{ setting_top(left) }}
|
||||
<div style="padding-left:20px; padding-top:-5px;">
|
||||
<span id={{id}}><a href="{{value}}" target="_blank">{{value}}</a></span>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc, padding_top='-5') }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 일반 텍스트 + 버튼 -->
|
||||
{% macro info_text_and_buttons(id, left, buttons, value='', desc=None) %}
|
||||
{{ setting_top(left) }}
|
||||
<div style="padding-left:20px; padding-top:-5px;">
|
||||
<span id={{id}}>{{value}}</span>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ setting_bottom(desc, padding_top='-5') }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 텍스트 + 버튼 -->
|
||||
{% macro setting_input_text_and_buttons(id, left, buttons, value='', col='9', placeholder='', desc='', type='text', disabled=False) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-{{ col }}">
|
||||
<input id="{{ id }}" name="{{ id }}" type="{{ type }}" class="form-control form-control-sm"
|
||||
{% if placeholder != '' %}
|
||||
placeholder="{{ placeholder }}"
|
||||
{% endif %}
|
||||
value="{{ value }}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- 저장버튼... -->
|
||||
{% macro setting_button(buttons, left='', desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-9">
|
||||
{% for b in buttons %}
|
||||
{% if not loop.first %}
|
||||
<span class='text-left' style="padding-left:5px; padding-top:0px">
|
||||
{% endif %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_button_with_info(buttons, left='', desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-9">
|
||||
{% for b in buttons %}
|
||||
{% if not loop.first %}
|
||||
<span class='text-left' style="padding-left:5px; padding-top:0px">
|
||||
{% endif %}
|
||||
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success"
|
||||
{% for d in b[2] %}
|
||||
data-{{d['key']}}="{{d['value']}}"
|
||||
{% endfor %}
|
||||
>{{b[1]}}</button>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- 라디오버튼 -->
|
||||
{% macro setting_radio(id, title, radios, value=None, desc=None, disabled=False) %}
|
||||
{{ setting_top(title) }}
|
||||
<div class="input-group col-sm-9">
|
||||
{% for r in radios %}
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
{% if value|int == loop.index0 %}
|
||||
<input id="{{id}}{{loop.index0}}" type="radio" class="custom-control-input" name="{{id}}" value="{{loop.index0}}" checked {% if disabled %} disabled {% endif %}>
|
||||
{% else %}
|
||||
<input id="{{id}}{{loop.index0}}" type="radio" class="custom-control-input" name="{{id}}" value="{{loop.index0}}" {% if disabled %} disabled {% endif %}>
|
||||
{% endif %}
|
||||
<label class="custom-control-label" for="{{id}}{{loop.index0}}">{{r}}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
<!-- select -->
|
||||
{% macro setting_select(id, title, options, col='9', desc=None, value=None) %}
|
||||
{{ setting_top(title) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<select id="{{id}}" name="{{id}}" class="form-control form-control-sm">
|
||||
{% for item in options %}
|
||||
{% if value is not none and value == item[0] %}
|
||||
<option value="{{ item[0] }}" selected>{{item[1]}}</option>
|
||||
{% else %}
|
||||
<option value="{{ item[0] }}">{{item[1]}}</option>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro select(id, options, col='3', value=None) %}
|
||||
<div class="input-group col-sm-{{col}}" style="padding-left:0px; padding-top:0px">
|
||||
|
||||
<select id="{{id}}" name="{{id}}" class="form-control form-control-sm">
|
||||
{% for item in options %}
|
||||
{% if value is not none and value == item[0] %}
|
||||
<option value="{{ item[0] }}" selected>{{item[1]}}</option>
|
||||
{% else %}
|
||||
<option value="{{ item[0] }}">{{item[1]}}</option>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- select + 버튼 -->
|
||||
{% macro setting_select_and_buttons(id, title, options, buttons, col='9', desc=None, value=None) %}
|
||||
{{ setting_top(title) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<select id="{{id}}" name="{{id}}" class="form-control form-control-sm">
|
||||
{% for item in options %}
|
||||
{% if value is not none and value == item[0] %}
|
||||
<option value="{{ item[0] }}" selected>{{item[1]}}</option>
|
||||
{% else %}
|
||||
<option value="{{ item[0] }}">{{item[1]}}</option>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_select_empty(id, title, col='9', desc=None, value=None) %}
|
||||
{{ setting_top(title) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<div id="{{id}}_div" name="{{id}}_div"></div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro setting_input_textarea(id, left, value='', col='9', row='3', desc='', disabled=False) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<textarea id="{{id}}" name="{{id}}" class="col-md-12" rows="{{row}}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro setting_input_textarea_wide(id, left, value='', col='12', row='3', desc='', disabled=False, padding='10') %}
|
||||
<div class='row' style="padding-top: {{padding}}px; padding-bottom:{{padding}}px; align-items: center;">
|
||||
<div class='col-sm-12'>
|
||||
{% if left != '' %}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<strong>{{ left }}</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<textarea id="{{id}}" name="{{id}}" class="col-md-12" rows="{{row}}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
</div>
|
||||
{% if desc is not none %}
|
||||
<div style="padding-left:20px; padding-top:{{padding_top}}}px;">
|
||||
<em>
|
||||
{% if desc is string %}
|
||||
{{ desc }}
|
||||
{% elif desc is iterable %}
|
||||
{% for d in desc %}
|
||||
{{ d }}<br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro setting_input_textarea_and_buttons(id, left, buttons, value='', col='9', row='3', desc='', disabled=False) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-{{col}}">
|
||||
<textarea id="{{id}}" name="{{id}}" class="col-md-12" rows="{{row}}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>{{ value }}</textarea>
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
<!--progress-bar-striped progress-bar-animated-->
|
||||
{% macro setting_progress(id, left='', desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="col-sm-9">
|
||||
<div class="progress" style="height: 25px;">
|
||||
<div id="{{id}}" class="progress-bar" style="background-color:yellow"></div>
|
||||
<div id="{{id}}_label" class="justify-content-center d-flex w-100 position-absolute" style="margin-top:3px"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- 스케쥴링 작동 버튼-->
|
||||
{% macro setting_scheduler_button(is_include, is_running, id='scheduler', left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지']) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
<input id="scheduler" name="scheduler" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="scheduler" name="scheduler" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- 스케쥴링 작동 버튼-->
|
||||
{% macro setting_global_scheduler_button(is_include, is_running, id='scheduler', left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지']) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
<input id="global_scheduler" name="global_scheduler" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="global_scheduler" name="global_scheduler" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_global_scheduler_sub_button(is_include, is_running, id='scheduler', left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지']) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
<input id="global_scheduler_sub" name="global_scheduler_sub" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="global_scheduler_sub" name="global_scheduler_sub" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro setting_global_scheduler_sublogic_button(is_include, is_running, id='scheduler', left='스케쥴링 작동', desc=['On : 스케쥴링 시작','Off : 스케쥴링 중지']) %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-3">
|
||||
{% if is_include == 'True' %}
|
||||
<input id="global_scheduler_sublogic" name="global_scheduler_sublogic" class="form-control form-control-sm" type="checkbox" data-toggle="toggle" checked>
|
||||
{% else %}
|
||||
<input id="global_scheduler_sublogic" name="global_scheduler_sublogic" class="form-control form-control-sm" type="checkbox" data-toggle="toggle">
|
||||
{% endif %}
|
||||
{% if is_running == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">동작중</span>
|
||||
{% else %}
|
||||
{% if is_include == 'True' %}
|
||||
<span style="padding-left:10px; padding-top: 8px;">대기중</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro m_row_start(padding='10', align='center') %}
|
||||
<div class="row" style="padding: {{padding}}px; align-items:{{align}};">
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_row_end() %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_col(width, html, align='left') %}
|
||||
<div class="col-sm-{{width}}" style="text-align:{{align}}; word-break:break-all;">{{html}}</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_strong(html) %}
|
||||
<strong>{{html}}</strong>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_hr() %}
|
||||
<hr style="width: 100%; margin-left:0px; margin-right:0px; margin-top:5px; margin-bottom:5px">
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro m_hr_black() %}
|
||||
<hr style="width: 100%; color: black; height: 2px; background-color:black;" />
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_hr_head_top() %}
|
||||
<div class="d-inline-block"></div>
|
||||
<hr style="width: 100%; margin:0px; background-color:#808080;">
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_hr_head_bottom() %}
|
||||
<hr style="width: 100%; margin:0px; margin-bottom:10px; margin-top:2px; background-color:#808080; height:2px" />
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_button(id, text) %}
|
||||
<button id="{{id}}" name="{{id}}" class="btn btn-sm btn-outline-success">{{text}}</button>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_button_group(buttons) %}
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group">
|
||||
{% for item in buttons %}
|
||||
<button id="{{item[0]}}" name="{{item[0]}}" class="btn btn-sm btn-outline-success">{{item[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_head_start() %}
|
||||
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_head_end() %}
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro m_tab_content_start(name, active) %}
|
||||
{% if active %}
|
||||
<div class="tab-pane fade show active" id="{{name}}" role="tabpanel">
|
||||
{% else %}
|
||||
<div class="tab-pane fade show" id="{{name}}" role="tabpanel">
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_content_end() %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_head(name, active) %}
|
||||
{% if active %}
|
||||
<a class="nav-item nav-link active" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{name}}</a>
|
||||
{% else %}
|
||||
<a class="nav-item nav-link" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{name}}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_tab_head2(name, title, active) %}
|
||||
{% if active %}
|
||||
<a class="nav-item nav-link active" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{title}}</a>
|
||||
{% else %}
|
||||
<a class="nav-item nav-link" id="tab_{{name}}" data-toggle="tab" href="#{{name}}" role="tab">{{title}}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro m_modal_start(id, title, size) %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="{{id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog {{size}}">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="{{id}}_title">{{title}}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="modal_body" style="word-break:break-all;">
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_modal_end() %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
<div class="loading" id="modal_loading">
|
||||
<img src="/static/img/loading.gif" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal end -->
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro m_modal_start2(id, title, size) %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="{{id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog {{size}}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="{{id}}_title">{{title}}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="loading" id="modal_loading">
|
||||
<img src="/static/img/loading.gif" />
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro m_modal_end2() %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal end -->
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
|
||||
{% macro setting_input_hidden(id, value) %}
|
||||
<input id="{{ id }}" name="{{ id }}" value="{{ value}}" type="hidden">
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% macro row_start(padding='10') %}
|
||||
<div class='row' style="padding-top: {{padding}}px; padding-bottom:{{padding}}px; align-items: center;">
|
||||
{% endmacro %}
|
||||
|
||||
{% macro row_end() %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label(text='', width='1', padding='5') %}
|
||||
<span class='col-md-{{width}} set-left' style='padding-top: {{padding}}px; padding-bottom:{{padding}}px; align-items: center;'>
|
||||
<strong>{{ text }}</strong>
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
<!-- 텍스트 + 버튼 -->
|
||||
{% macro input_text_and_buttons(id, left, buttons, value='', col1='1', col2='9', col3='2', placeholder='', desc='', type='text', disabled=False) %}
|
||||
<div class='row' style="padding-top: 0px; padding-bottom:0px; align-items: left;">
|
||||
<div class="col-sm-{{col1}}" style="padding-top: 5px; text-align:right;">
|
||||
{% if left != '' %}
|
||||
<span><strong>{{ left }}</strong></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-{{ col2 }}">
|
||||
<input id="{{ id }}" name="{{ id }}" type="{{ type }}" class="form-control form-control-sm"
|
||||
{% if placeholder != '' %}
|
||||
placeholder="{{ placeholder }}"
|
||||
{% endif %}
|
||||
value="{{ value }}"
|
||||
{% if disabled %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>
|
||||
</div>
|
||||
<div class="col-sm-{{ col3 }}">
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group" style="padding-left:5px; padding-top:0px">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if desc is not none %}
|
||||
<div style="padding-left:20px; padding-top:{{padding_top}}}px;">
|
||||
<em>
|
||||
{% if desc is string %}
|
||||
{{ desc }}
|
||||
{% elif desc is iterable %}
|
||||
{% for d in desc %}
|
||||
{{ d }}<br>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro buttons(buttons, left='', desc='') %}
|
||||
{{ setting_top(left) }}
|
||||
<div class="input-group col-sm-9">
|
||||
<div class="btn-group btn-group-sm flex-wrap mr-2" role="group">
|
||||
{% for b in buttons %}
|
||||
<button id="{{b[0]}}" class="btn btn-sm btn-outline-success">{{b[1]}}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{{ setting_bottom(desc) }}
|
||||
{% endmacro %}
|
||||
111
templates/menu.html
Executable file
111
templates/menu.html
Executable file
@@ -0,0 +1,111 @@
|
||||
{% macro menu() %}
|
||||
{% if show_menu() %}
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark flex-md-nowrap shadow" role="navigation">
|
||||
<a class="navbar-brand" href="/">{{get_web_title()}}</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample01" aria-controls="navbarsExample01" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
{% for i in range(2) %}
|
||||
<div class="collapse navbar-collapse w-100" id="navbarsExample01">
|
||||
{% if i == 0 %}
|
||||
<ul class="nav navbar-nav mr-auto">
|
||||
{% else %}
|
||||
<ul class="nav navbar-nav ml-auto">
|
||||
{% endif %}
|
||||
{% set menu = request.full_path | get_menu %}
|
||||
{% set menu_map = get_menu_map() %}
|
||||
{% set login_status = get_login_status() %}
|
||||
{% for category in menu_map %}
|
||||
|
||||
{% if category['type'] == 'link' and login_status == False %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
{% if (i==0 and category['position'] == 'left') or (i==1 and category['position'] == 'right') %}
|
||||
<li class="nav-item dropdown">
|
||||
{% if category['count'] == 0 %}
|
||||
<a class="nav-link" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{category['category']}}</a>
|
||||
{% else %}
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{category['category']}}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not (category['type'] == 'custom' and category['count'] == 0) %}
|
||||
{% if category['position'] == 'left' %}
|
||||
<div class="dropdown-menu" style="top:34px;" aria-labelledby="navbarDropdown">
|
||||
{% else %}
|
||||
<div class="dropdown-menu dropdown-menu-right" style="top:34px;" aria-labelledby="navbarDropdown">
|
||||
{% endif %}
|
||||
{% for category_child in category['list'] %}
|
||||
{% if category_child['type'] == 'link' %}
|
||||
<a class="dropdown-item" href="{{ category_child['link'] }}" target="_blank" style="font-size: .850rem; font-weight:bold">{{ category_child['name'] }}</a>
|
||||
{% elif category_child['type'] == 'direct' %}
|
||||
<a class="dropdown-item" href="{{ category_child['link'] }}" style="font-size: .850rem; font-weight:bold">{{ category_child['name'] }}</a>
|
||||
{% elif category_child['type'] == 'divider' %}
|
||||
<div class="dropdown-divider"></div>
|
||||
{% else %}
|
||||
{% if 'exist' in category_child %}
|
||||
{% if category_child['plugin'] == menu[0] %}
|
||||
<a class="dropdown-item active" href="/{{ category_child['plugin'] }}" style="font-size: .850rem; font-weight:bold">{{ category_child['name'] }}</a>
|
||||
{% else %}
|
||||
<a class="dropdown-item" href="/{{ category_child['plugin'] }}" style="font-size: .850rem; font-weight:bold">{{ category_child['name'] }}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a class="dropdown-item disabled" href="#" style="font-size: .850rem;color: gray">{{ category_child['name'] }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro left(endpoint) %}
|
||||
<div id='plugin_first_menu'>
|
||||
{% set menu = request.full_path | get_menu %}
|
||||
{% set menu_map = get_menu_map() %}
|
||||
{% for category in menu_map %}
|
||||
{% for category_child in category['list'] %}
|
||||
{% if menu[0] == category_child['plugin'] %}
|
||||
<ul class="nav nav-pills bg-light shadow text-dark" >
|
||||
<li class="nav-item"><span class="nav-link">{{category['category']}} >> {{category_child['name']}}</span></li>
|
||||
{% for sub in category_child['sub'] %}
|
||||
{% if menu[1] == sub[0] %}
|
||||
<li class="nav-item"><a class="nav-link active" href="/{{menu[0]}}/{{sub[0]}}">{{sub[1]}}</a></li>
|
||||
{% else %}
|
||||
<li class="nav-item"><a class="nav-link" href="/{{menu[0]}}/{{sub[0]}}">{{sub[1]}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro menu_sub() %}
|
||||
{% set menu = request.full_path | get_menu %}
|
||||
{% set plugin_menu = menu[0] | get_plugin_menu %}
|
||||
{% if plugin_menu != None %}
|
||||
{% if 'sub2' in plugin_menu and plugin_menu['sub2'] != None %}
|
||||
{% if menu[1] in plugin_menu['sub2'] %}
|
||||
<ul class="nav nav-pills bg-light shadow text-dark" >
|
||||
{% for sub_menu in plugin_menu['sub2'][menu[1]] %}
|
||||
{% if sub_menu[0] == menu[2] %}
|
||||
<li class="nav-item"><a class="nav-link active" href="/{{ menu[0] }}/{{ menu[1] }}/{{ sub_menu[0] }}">{{sub_menu[1]}}</a></li>
|
||||
{% else %}
|
||||
<li class="nav-item"><a class="nav-link" href="/{{ menu[0] }}/{{ menu[1] }}/{{ sub_menu[0] }}">{{sub_menu[1]}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="d-inline-block"></div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user