update to Bootstrap 5

This commit is contained in:
KF7EEL 2021-10-05 20:33:12 -07:00
parent 55c0651795
commit d53743e171
6 changed files with 298 additions and 250 deletions

View File

@ -710,19 +710,17 @@ def hbnet_web_service():
l_news = News.query.order_by(News.time.desc()).first()
content = '''
<div class="well well-sm" style="text-align: center;"><h3>''' + l_news.subject + '''</h3>
<hr />
<p>&nbsp;</p>
<strong>''' + l_news.date + '''</strong> - <a href="/news/''' + str(l_news.id) + '''"><button type="button" class="btn btn-primary">Link</button></a>
<p>&nbsp;</p>
<hr />
<div class="well well-sm" style="max-width:900px; word-wrap:break-word;">
''' + l_news.text + '''
<div class="card">
<div class="card-body">
<h4 class="card-title"><a href="news/''' + str(l_news.id) + '''">''' + l_news.subject + '''</h4></a>
<hr />
<p style="text-align: center;">''' + l_news.date + '''</p>
<hr />
&nbsp;
<p class="card-text">''' + l_news.text + '''</p>
<p style="text-align: center;"></p>
</div>
</div>
</div>
'''
except:
content = ''
@ -892,9 +890,9 @@ def hbnet_web_service():
script_links[i[0]] = link_num
misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False)
content = content + '''
<div class="panel panel-default">
<div class="panel-heading" style="text-align: center;"><h4>ID: ''' + str(i[0]) + '''</h4></div>
<div class="panel-body"><pre>rpi-rw; wget -O /root/auto_pistar.py "<a href="''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''">''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''</a>"; chmod +x /root/auto_pistar.py; python3 /root/auto_pistar.py; pistar-update</pre></div>
<div class="card">
<div class="card-header" style="text-align: center;"><h4>ID: ''' + str(i[0]) + '''</h4></div>
<div class="card-body"><pre>rpi-rw; wget -O /root/auto_pistar.py "<a href="''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''">''' + str(url) + '/get_script?dmr_id=' + str(i[0]) + '&number=' + str(link_num) + '''</a>"; chmod +x /root/auto_pistar.py; python3 /root/auto_pistar.py; pistar-update</pre></div>
</div>
'''
#else:
@ -945,9 +943,9 @@ def hbnet_web_service():
</div> '''
svr_content = svr_content + '''
<div class="panel panel-default">
<div class="panel-heading" style="text-align: center;"><h3>''' + i.name + '''</h3></div>
<div class="panel-body container-fluid center;">
<div class="card">
<div class="card-header" style="text-align: center;"><h3>''' + i.name + '''</h3></div>
<div class="card-body container-fluid center;">
<hr />
''' + svr_status + '''
<div style="max-width:200px; word-wrap:break-word; text-align: center;">''' + i.public_notes + '''</div>
@ -975,9 +973,9 @@ def hbnet_web_service():
misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False)
#print(script_links)
content = content + '''\n
<div class="panel panel-default" style="text-align: center;">
<div class="panel-heading"><h4>''' + str(i[0]) + '''</h4></div>
<div class="panel-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<div class="card " style="text-align: center;">
<div class="card-header"><h4>''' + str(i[0]) + '''</h4></div>
<div class="card-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<pre><strong>''' + str(gen_passphrase(int(i[0]))) + '''</strong></pre>
<hr />
<br />
@ -991,9 +989,9 @@ def hbnet_web_service():
misc_edit_field_1('script_links', str(script_links), '', '', 0, 0, 0, 0, False, False)
#print(script_links)
content = content + '''\n
<div class="panel panel-default" style="text-align: center;">
<div class="panel-heading"><h4>''' + str(i[0]) + '''</h4></div>
<div class="panel-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<div class="card" style="text-align: center;">
<div class="card-header"><h4>''' + str(i[0]) + '''</h4></div>
<div class="card-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<pre><strong>''' + str(gen_passphrase(int(i[0]))) + '''</strong></pre>
<hr />
<br />
@ -1003,9 +1001,9 @@ def hbnet_web_service():
'''
elif i[1] == '':
content = content + '''
<div class="panel panel-default" style="text-align: center;">
<div class="panel-heading"><h4>''' + str(i[0]) + '''</h4></div>
<div class="panel-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<div class="card" style="text-align: center;">
<div class="card-header"><h4>''' + str(i[0]) + '''</h4></div>
<div class="card-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<pre><strong>''' + legacy_passphrase + '''</strong></pre>
<hr />
<br />
@ -1015,9 +1013,9 @@ def hbnet_web_service():
'''
else:
content = content + '''
<div class="panel panel-default" style="text-align: center;">
<div class="panel-heading"><h4>''' + str(i[0]) + '''</h4></div>
<div class="panel-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<div class="card" style="text-align: center;">
<div class="card-header"><h4>''' + str(i[0]) + '''</h4></div>
<div class="card-body" style="max-width:300px; word-wrap:break-word; text-align: center;">MMDVM Passphrase:
<pre><strong>''' + str(i[1]) + '''</strong></pre>
<hr />
<br />
@ -1091,15 +1089,20 @@ def hbnet_web_service():
def list_users():
u = User.query.all()
# Broken for now, link taken out - <h2 style="text-align: center;"><strong>List/edit users:</strong></h2><p>&nbsp;</p><p style="text-align: center;"><a href="edit_user"><strong>Enter Callsign</strong></a></p>
u_list = '''<p>&nbsp;</p><table style="width: 700px; margin-left: auto; margin-right: auto;" border="1">
<tbody>
<tr>
<td style="width: 107px; text-align: center;"><strong>Callsign</strong></td>
<td style="width: 107px; text-align: center;"><strong>Name</strong></td>
<td style="width: 226.683px; text-align: center;"><strong>Enabled</strong></td>
<td style="width: 522.317px; text-align: center;"><strong>DMR ID:Authentication</strong></td>
<td style="width: 522.317px; text-align: center;"><strong>Notes</strong></td>
</tr>'''
u_list = '''
<table data-toggle="table" data-pagination="true" data-search="true" >
<thead>
<tr>
<th>Callsign</th>
<th>Name</th>
<th>Enabled</th>
<th>DMR ID:Authentication</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
'''
for i in u:
u_list = u_list + '''
<tr>
@ -1925,17 +1928,19 @@ def hbnet_web_service():
art_count = 1
if art_count < 16:
news_content = news_content + '''
<div class="well well-sm" s style="text-align: center;"><h3>''' + article.subject + '''</h3>
<hr />
<p style="text-align: center;">&nbsp;</p>
<strong>''' + article.date + '''</strong> - <a href="news/''' + str(article.id) + '''"><button type="button" class="btn btn-primary">Link</button></a>
<p style="text-align: center;">&nbsp;</p>
<hr />
<div class="well well-sm" style="max-width:900px; word-wrap:break-word;">
''' + article.text + '''
<div class="card">
<div class="card-body">
<h4 class="card-title"><a href="news/''' + str(article.id) + '''">''' + article.subject + '''</h4></a>
<hr />
<p style="text-align: center;">''' + article.date + '''</p>
<hr />
&nbsp;
<p class="card-text">''' + article.text + '''</p>
<p style="text-align: center;"></p>
</div>
</div>
<p>&nbsp;</p>
'''
art_count = art_count + 1
@ -1948,17 +1953,17 @@ def hbnet_web_service():
view_arti = News.query.filter_by(id=article).first()
content = '''
<div class="well well-sm" style="text-align: center;"><h3>''' + view_arti.subject + '''</h3>
<hr />
<p>&nbsp;</p>
<strong>''' + view_arti.date + '''</strong>
<p>&nbsp;</p>
<hr />
<div class="well well-sm" style="max-width:900px; word-wrap:break-word;">
''' + view_arti.text + '''
<div class="card">
<div class="card-body">
<h4 class="card-title">''' + view_arti.subject + '''</h4>
<hr />
<p style="text-align: center;">''' + view_arti.date + '''</p>
<hr />
&nbsp;
<p class="card-text">''' + view_arti.text + '''</p>
<p style="text-align: center;"></p>
</div>
</div>
'''
return render_template('news.html', markup_content = Markup(content))
@ -2025,14 +2030,16 @@ def hbnet_web_service():
<p style="text-align: center;"><a href="add_news"><strong><button type="button" class="btn btn-success">Add News Article</button></strong></a></p>
<p>&nbsp;</p>
<table style="width: 500px; margin-left: auto; margin-right: auto;" border="1">
<tbody>
<tr>
<td style="text-align: center;"><strong>Subject</strong></td>
<td style="text-align: center;"><strong>Date</strong></td>
<td style="text-align: center;"><strong>ID</strong></td>
</tr>'''
<table data-toggle="table" data-pagination="true" data-search="true" >
<thead>
<tr>
<th>Subject</th>
<th>Date</th>
<th>ID</th>
</tr>
</thead>
<tbody>
'''
for a in view_news:
content = content + '''
@ -2198,83 +2205,83 @@ def hbnet_web_service():
'''
return render_template('flask_user_layout.html', markup_content = Markup(content))
@app.route('/user_tg')
def tg_status():
cu = current_user
u = User.query.filter_by(username=cu.username).first()
sl = ServerList.query.all()
user_ids = ast.literal_eval(u.dmr_ids)
content = '<p style="text-align: center;">Currently active talkgroups. Updated every 2 minutes.</p>'
## print(active_tgs)
for s in sl:
for i in user_ids.items():
for ts in active_tgs[s.name].items():
## print(ts)
## print(ts[1][3]['peer_id'])
if i[0] == ts[1][3]['peer_id']:
## print(i[0])
print(ts)
## if i[0] in active_tgs[s.name]:
## for x in ts[1]:
## print(x)
## ## if i[0] != ts[1][x][3]['peer_id']:
## ## print('nope')
## ## pass
## ## elif i[0] == ts[1][x][3]['peer_id']:
## ## print(x)
## ## print(s.name)
## ## print('-----ts-----')
## ## print(ts[1][x][3]['peer_id']) #[s.name][3]['peer_id'])
## ## print(active_tgs)
##
## ## print(active_tgs[s.name])
## ## print(str(active_tgs[ts[1]]))
## # Remove 0 from TG list
try:
active_tgs[s.name][ts[0]][0]['1'].remove(0)
active_tgs[s.name][ts[0]][1]['2'].remove(0)
except:
pass
#### try:
content = content + ''' <table style="width: 500px; margin-left: auto; margin-right: auto;" border="1">
<tbody>
<tr>
<td style="text-align: center;">
<h3><strong>Server:</strong> ''' + str(s.name) + '''</h3>
<p><strong>DMR ID:</strong> ''' + str(i[0]) + '''</p>
</td>
</tr>
<tr>
<td>&nbsp;
<table style="width: 499px; float: left;" border="1">
<tbody>
<tr>
<td style="width: 85.7px;"><strong>Timeslot 1</strong></td>
<td style="width: 377.3px;">&nbsp;''' + str(active_tgs[s.name][ts[0]][0]['1'])[1:-1] + '''</td>
</tr>
<tr>
<td style="width: 85.7px;"><strong>Timeslot 2</strong></td>
<td style="width: 377.3px;">&nbsp;''' + str(active_tgs[s.name][ts[0]][1]['2'])[1:-1] + '''</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>'''
## except:
## pass
## #TS1
## for tg in active_tgs[s.name][i[0]][1]['2']:
## content = content + '''<td style="width: 377.3px;">&nbsp;''' + str(tg) + '''</td>
##'''
## print(active_tgs[s.name][i[0]])
## content = active_tgs[s.name][i[0]][1]['2']
## content = 'hji'
return render_template('flask_user_layout.html', markup_content = Markup(content))
## @app.route('/user_tg')
## def tg_status():
## cu = current_user
## u = User.query.filter_by(username=cu.username).first()
## sl = ServerList.query.all()
## user_ids = ast.literal_eval(u.dmr_ids)
## content = '<p style="text-align: center;">Currently active talkgroups. Updated every 2 minutes.</p>'
#### print(active_tgs)
## for s in sl:
## for i in user_ids.items():
## for ts in active_tgs[s.name].items():
#### print(ts)
#### print(ts[1][3]['peer_id'])
## if i[0] == ts[1][3]['peer_id']:
#### print(i[0])
## print(ts)
#### if i[0] in active_tgs[s.name]:
#### for x in ts[1]:
#### print(x)
#### ## if i[0] != ts[1][x][3]['peer_id']:
#### ## print('nope')
#### ## pass
#### ## elif i[0] == ts[1][x][3]['peer_id']:
#### ## print(x)
#### ## print(s.name)
#### ## print('-----ts-----')
#### ## print(ts[1][x][3]['peer_id']) #[s.name][3]['peer_id'])
#### ## print(active_tgs)
####
#### ## print(active_tgs[s.name])
#### ## print(str(active_tgs[ts[1]]))
#### # Remove 0 from TG list
## try:
## active_tgs[s.name][ts[0]][0]['1'].remove(0)
## active_tgs[s.name][ts[0]][1]['2'].remove(0)
## except:
## pass
###### try:
## content = content + ''' <table style="width: 500px; margin-left: auto; margin-right: auto;" border="1">
##<tbody>
##<tr>
##<td style="text-align: center;">
##<h3><strong>Server:</strong> ''' + str(s.name) + '''</h3>
##<p><strong>DMR ID:</strong> ''' + str(i[0]) + '''</p>
##</td>
##</tr>
##<tr>
##<td>&nbsp;
##<table style="width: 499px; float: left;" border="1">
##<tbody>
##<tr>
##<td style="width: 85.7px;"><strong>Timeslot 1</strong></td>
##<td style="width: 377.3px;">&nbsp;''' + str(active_tgs[s.name][ts[0]][0]['1'])[1:-1] + '''</td>
##</tr>
##<tr>
##<td style="width: 85.7px;"><strong>Timeslot 2</strong></td>
##<td style="width: 377.3px;">&nbsp;''' + str(active_tgs[s.name][ts[0]][1]['2'])[1:-1] + '''</td>
##</tr>
##</tbody>
##</table>
##</td>
##</tr>
##</tbody>
##</table>'''
#### except:
#### pass
##
##
#### #TS1
#### for tg in active_tgs[s.name][i[0]][1]['2']:
#### content = content + '''<td style="width: 377.3px;">&nbsp;''' + str(tg) + '''</td>
####'''
#### print(active_tgs[s.name][i[0]])
#### content = active_tgs[s.name][i[0]][1]['2']
#### content = 'hji'
##
## return render_template('flask_user_layout.html', markup_content = Markup(content))
@app.route('/tg/<name>') #, methods=['POST', 'GET'])
## @login_required
@ -2283,7 +2290,7 @@ def hbnet_web_service():
content = '''
<div class="row">
<div class="well well-sm" style="text-align: center;"><h2>''' + tg_d.bridge_name + '''</h2>
<div class="card " style="text-align: center;"><h2>''' + tg_d.bridge_name + '''</h2>
<hr />
TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
<hr />
@ -5836,15 +5843,17 @@ TG #: <strong> ''' + str(tg_d.tg) + '''</strong>
</table>
<p>&nbsp;</p>
<table style="width: 700px; margin-left: auto; margin-right: auto;" border="1">
<tbody>
<tr>
<td style="text-align: center; width: 187px;"><strong>Name</strong></td>
<td style="text-align: center; width: 61.55px;"><strong>Public</strong></td>
<td style="text-align: center; width: 227.45px;"><strong>Description</strong></td>
<td style="text-align: center; width: 88px;"><strong>TGID</strong></td>
<table data-toggle="table" data-pagination="true" data-search="true" >
<thead>
<tr>
<th>Name</th>
<th>Public</th>
<th>Description</th>
<th>TGID</th>
</tr>
</thead>
<tbody>
</tr>
'''
for i in all_b:
b_list = b_list + '''

View File

@ -5,27 +5,21 @@
<div class="row container-fluid" >
<div class="col-sm-12">
<h1 style="text-align: center;">Last Known Location</h1>
<table style="border-color: black; margin-left: auto; margin-right: auto;" border="2" cellspacing="6" cellpadding="2"><tbody>
<table data-toggle="table" data-pagination="true" data-search="true" >
<thead>
<tr>
<td style="text-align: center;">
<h2><strong>&nbsp;Callsign&nbsp;</strong></h2>
</td>
<td style="text-align: center;">
<h2>&nbsp;<strong>Latitude</strong>&nbsp; </h2>
</td>
<td style="text-align: center;">
<h2>&nbsp;<strong>Longitude</strong>&nbsp;</h2>
</td>
<td style="text-align: center;">
<h2>&nbsp;<strong>Time</strong>&nbsp;</h2>
</td>
<th>Callsign</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Time</th>
</tr>
</thead>
<tbody>
{{markup_content}}
</tbody>
</tbody>
</table>
</div>
</div>
<p>&nbsp;</p>
{% endblock %}

View File

@ -7,7 +7,9 @@
<title>{{ user_manager.USER_APP_NAME }}</title>
<!-- Bootstrap -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.15.5/dist/bootstrap-table.min.css">
<!-- In-lining styles to avoid needing a separate .css file -->
<style>
@ -30,73 +32,103 @@
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand">{{ user_manager.USER_APP_NAME }}</a>
</div>
<ul class="nav navbar-nav">
<li><a href="/"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li><a href="{{url}}/talkgroups"><span class="glyphicon glyphicon-list"></span> Talkgroups</a></li>
<li><a href="{{url}}/aprs"><span class="glyphicon glyphicon-list"></span> APRS</a></li>
<li><a href="{{url}}/news"><span class="glyphicon glyphicon-list-alt"></span> News</a></li>
<li><a href="{{url}}/help"><span class="glyphicon glyphicon-question-sign"></span> Help</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% if not call_or_get(current_user.is_authenticated) %}
<li><a href="{{ url_for('user.login') }}"><span class="glyphicon glyphicon-log-in"></span> Sign In</a></li>
<li><a href="{{ url_for('user.register') }}"><span class="glyphicon glyphicon-user"></span> Register</a></li>
{% endif %}
{% if call_or_get(current_user.is_authenticated) %}
<li><a href="{{url}}/map"><span class="glyphicon glyphicon-map-marker"></span> Map</a></li>
<li><a href="{{url}}/generate_passphrase"><span class="glyphicon glyphicon-lock"></span> Passphrase(s)</a></li>
<li><a href="{{ url_for('user.edit_user_profile') }}"><span class="glyphicon glyphicon-user"></span> Edit {{ current_user.username or current_user.email }}</a></li>
<li><a href="{{ url_for('user.logout') }}"><span class="glyphicon glyphicon-remove"></span> Sign Out</a></li>
</ul>
{% endif%}
<!-- A grey horizontal navbar that becomes vertical on small screens -->
<nav class="navbar navbar-expand-sm bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">
{{ user_manager.USER_APP_NAME }}
</a>
<!-- Links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="{{url}}/"> Home </a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url}}/talkgroups"> Talkgroups </a>
<!--Admin Menu -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="aprs_menu" role="button" data-bs-toggle="dropdown" aria-expanded="false">
APRS/SMS
</a>
<ul class="dropdown-menu" aria-labelledby="aprs_menu">
<li><a class="dropdown-item" href="{{url}}/aprs">APRS Dashboard</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url}}/news"> News </a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url}}/help"> Help </a>
</li>
</ul>
<!--Admin Menu -->
{% if call_or_get(current_user.is_authenticated) %}
{% if call_or_get(current_user.has_roles('Admin')) %}
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">MMDVM Admin
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/manage_servers">Manage Servers</a></li>
<li><a href="{{url}}/manage_peers">Manage Peers</a></li>
<li><a href="{{url}}/manage_masters">Manage Masters</a></li>
<li><a href="{{url}}/manage_rules">Manage Rules</a></li>
</ul>
</li>
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="aprs_menu" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Admin
</a>
<ul class="dropdown-menu" aria-labelledby="mmdvm_admin">
<li><a class="dropdown-item" href="{{url}}/manage_servers">Manage Servers</a></li>
<li><a class="dropdown-item" href="{{url}}/manage_peers">Manage Peers</a></li>
<li><a class="dropdown-item" href="{{url}}/manage_masters">Manage Masters</a></li>
<li><a class="dropdown-item" href="{{url}}/manage_rules">Manage Rules</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{{url}}/add_user">Add User</a></li>
<li><a class="dropdown-item" href="{{url}}/list_users">Manage Users</a></li>
<li><a class="dropdown-item" href="{{url}}/approve_users">Waiting Approval</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{{url}}/manage_news">Manage News</a></li>
<li><a class="dropdown-item" href="{{url}}/misc_settings">Misc Options</a></li>
<li><a class="dropdown-item" href="{{url}}/auth_log">Authorization Log</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">User Admin
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/add_user">Add User</a></li>
<li><a href="{{url}}/list_users">Manage Users</a></li>
<li><a href="{{url}}/approve_users">Waiting Approval</a></li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Other
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{url}}/manage_news">Manage News</a></li>
<li><a href="{{url}}/misc_settings">Misc Options</a></li>
<li><a href="{{url}}/auth_log">Authorization Log</a></li>
</ul>
</li>
</ul>
</li>
</ul>
{% endif %}
{% endif %}
{% endif %}
<ul class="navbar-nav">
{% if not call_or_get(current_user.is_authenticated) %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.login') }}">Sign In</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.register') }}">Register</a>
</li>
{% endif %}
{% if call_or_get(current_user.is_authenticated) %}
<li class="nav-item">
<a class="nav-link" href="{{url}}/map">Map</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{url}}/generate_passphrase">Passphrase(s)</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.edit_user_profile') }}">Change {{ current_user.username or current_user.email }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('user.logout') }}">Sign Out</a>
</li>
{% endif %}
</ul>
</div>
</nav>
</nav>
<p><img class="img-responsive" style="display: block; margin-left: auto; margin-right: auto;" src="{{ url_for('static', filename='HBnet.png') }}" alt="Logo" width="300" height="144" /></p>
<hr />
@ -137,9 +169,12 @@
{% endblock %}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<!-- Bootstrap -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.js"></script>
{# *** Allow sub-templates to insert extra html to the bottom of the body *** #}
{% block extra_js %}{% endblock %}

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="panel panel-default" >
<div class="card" >
<div class="panel-heading" style="text-align: center;"><h4>Pi-Star Instructions</h4></div>
<div class="panel-body">
<p>&nbsp;</p>

View File

@ -7,7 +7,10 @@
<p style="text-align: center;"><strong>Note:</strong> Talkgroups listed here may not be available on all servers. See <a href="/generate_passphrase">Passphrase(s)</a> for complete list of talkgroup availability per server.</p>
<p style="text-align: center;"><a href="hbnet_tg.csv"><strong>Download talkgroup CSV</strong></a> | <a href="hbnet_tg_anytone.csv"><strong>Download talkgroup CSV (Anytone format)</strong></a></p>
<div class="container-fluid">
<table class="table table-striped table-bordered" style="width:100%" id="all_tg">
<!-- <table class="table table-striped table-bordered" style="width:100%" id="all_tg"> -->
<table data-toggle="table" data-pagination="true" data-search="true">
<thead>
<tr>
<th style="width: 146.1px; text-align: center;">Name</th>
@ -29,9 +32,5 @@
</div>
<p>&nbsp;</p>
<script type = "text/javascript">
$(document).ready( function () {
$('#table_id').DataTable();
} );
</script>
{% endblock %}

View File

@ -1,27 +1,36 @@
{% extends 'flask_user/_public_base.html' %}
{% block content %}
<p>&nbsp;</p>
<div class="well"><h4 style="text-align: center;"><a href="/generate_passphrase/pi-star"><button type="button" class="btn btn-warning">Automatic Pi-Star Setup Script</button></a> </h4><br />
<h4 style="text-align: center;"><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#mmdvm_options">Available MMDVM Options</button></h4></div>
<div class="card bg-light card-body mb-3">
<h4 style="text-align: center;"><a href="/generate_passphrase/pi-star"><button type="button" class="btn btn-warning">Automatic Pi-Star Setup Script</button></a> </h4>
<br>
<h4 style="text-align: center;"><button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#options_modal">
MMDVM Options
</button></h4>
</div>
<div class="row">
<div class="col-xs-6">{{server_content}}</div>
<div class="col-xs-6">{{passphrase_content}}</div>
<div class="col-sm-6">{{server_content}}</div>
<div class="col-sm-6">{{passphrase_content}}</div>
</div>
<!-- Options Modal -->
<div id="mmdvm_options" class="modal fade" role="dialog">
<div class="modal fade" id="options_modal">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">MMDVM Options</h4>
<h4 class="modal-title">Modal Heading</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<!-- Modal body -->
<div class="modal-body">
<div class="container-fluid">
<table class="table table-striped">
<thead>
@ -40,13 +49,15 @@
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<p>&nbsp;</p>