pc_listテーブルのスタイルを変更
This commit is contained in:
parent
783b4eb385
commit
f2876aef0a
3 changed files with 25 additions and 6 deletions
|
@ -494,19 +494,19 @@ def admin():
|
||||||
|
|
||||||
@app.route('/admin/pc_list')
|
@app.route('/admin/pc_list')
|
||||||
def admin_pclist():
|
def admin_pclist():
|
||||||
table = '<table><thead><tr><th>PC番号</th><th>ニックネーム</th><th>マスターパスワード</th></tr></thead><tbody>'
|
table = '<table id="pc_list_table"><thead><tr><th>PC番号</th><th>ニックネーム</th><th>マスターパスワード</th></tr></thead><tbody>'
|
||||||
pc_list = auth.get_pc_list()
|
pc_list = auth.get_pc_list()
|
||||||
for i in pc_list:
|
for i in pc_list:
|
||||||
pc_number = i[0]
|
pc_number = i[0]
|
||||||
alt_name = i[1]
|
alt_name = i[1]
|
||||||
if alt_name == None:
|
if alt_name == None:
|
||||||
alt_name = '--未登録--'
|
alt_name = '-ニックネーム未登録-'
|
||||||
|
|
||||||
master_password = i[2]
|
master_password = i[2]
|
||||||
if master_password == None:
|
if master_password == None:
|
||||||
master_password = '--未登録--'
|
pass
|
||||||
|
else:
|
||||||
table += f'<tr><td>{pc_number}</td><td>{alt_name}</td><td>{master_password}</td></tr>'
|
table += f'<tr><td>{pc_number}</td><td>{alt_name}</td><td>{master_password}</td></tr>'
|
||||||
|
|
||||||
table += '</tbody></table>'
|
table += '</tbody></table>'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#sidebar {
|
#sidebar {
|
||||||
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 30%;
|
width: 30%;
|
||||||
background-color: aliceblue;
|
background-color: aliceblue;
|
||||||
|
@ -10,4 +9,23 @@
|
||||||
#general {
|
#general {
|
||||||
display: flex;
|
display: flex;
|
||||||
float: left;
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pc_list_table {
|
||||||
|
width: 50%;
|
||||||
|
table-layout: fixed;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 2px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
padding: 2px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 2px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 8px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 2px solid;
|
||||||
}
|
}
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>PCリストあるよ(笑)</h1>
|
<h1>PCリストあるよ(笑)</h1>
|
||||||
|
<h2>登録されたPCのみが表示されています。</h2>
|
||||||
{{pc_list_table | safe}}
|
{{pc_list_table | safe}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue