134 lines
7.6 KiB
HTML
134 lines
7.6 KiB
HTML
|
<div class="container-fluid my-3">
|
||
|
<div class="row">
|
||
|
<div class="col-12">
|
||
|
<h3 class="text-white">Portal Information</h3>
|
||
|
<hr class="bg-white">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
<div class="row">
|
||
|
<div class="col-lg-1 col-md-2 col-sm-2 col-4">
|
||
|
% if portal_info['logo'] == None:
|
||
|
<img class="w-100" src="${GV_base_url}/media/portal/logo/default.png" alt="${portal_info['title']}">
|
||
|
% else:
|
||
|
<img class="w-100" src="${portal_info['logo']}" alt="${portal_info['title']}">
|
||
|
% endif
|
||
|
</div>
|
||
|
<div class="col-lg-11 col-md-10 col-sm-10 col-8">
|
||
|
<b>${portal_info['title']}</b><br>
|
||
|
<a href="${portal_info['website']}" target="_blank">${portal_info['website']}</a><br>
|
||
|
<input class="form-control form-control-sm" type="text" value="${portal_info['directory']}" readonly>
|
||
|
% if storage_available == True:
|
||
|
<span class="badge badge-success">Storage detected</span>
|
||
|
% else:
|
||
|
<span class="badge badge-danger">Storage not detected</span>
|
||
|
% endif
|
||
|
% if storage_available:
|
||
|
% if checking_status == 'new':
|
||
|
<span class="badge badge-primary">${new_file_info['count']} New file detected</span>
|
||
|
% elif checking_status == 'miss':
|
||
|
<span class="badge badge-danger">Some file is missing</span>
|
||
|
% else:
|
||
|
<span class="badge badge-success">Files updated</span>
|
||
|
% endif
|
||
|
% endif
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
% if storage_available:
|
||
|
% if new_file_info:
|
||
|
<div class="row mt-3">
|
||
|
<div class="col-12">
|
||
|
<h3 class="text-white">
|
||
|
New Files <span class="badge badge-primary">${new_file_info['count']}</span>
|
||
|
</h3>
|
||
|
<hr class="bg-white">
|
||
|
</div>
|
||
|
<% i = 0 %>
|
||
|
% for row in new_file_info['info']:
|
||
|
<% i += 1 %>
|
||
|
<div class="col-lg-4 col-md-4 mb-3">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
|
||
|
<img class="w-100 mb-2" src="${GV_base_url}/media/thumbs/${row['name']}${row['type']}.jpg" alt="thumbnail">
|
||
|
|
||
|
<h4>
|
||
|
${row['name']} <span class="badge badge-primary">${row['type']}</span>
|
||
|
</h4>
|
||
|
<!-- ${row['file']}<br> -->
|
||
|
<span class="badge badge-primary">
|
||
|
${"%0.2f" % (row['size']/1000000)} MB (${row['size']})
|
||
|
</span>
|
||
|
<span class="badge badge-primary">
|
||
|
${int(row['width'])} x ${int(row['height'])}
|
||
|
</span>
|
||
|
<hr>
|
||
|
<form action="${GV_base_url}/api/video/add/new" method="post">
|
||
|
<div class="form-group">
|
||
|
<label>Title</label>
|
||
|
<input class="form-control form-control-sm mb-2" type="text" name="title" placeholder="Title" value="${row['name']}">
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<label>Description</label>
|
||
|
<input class="form-control form-control-sm mb-2" type="text" name="description" placeholder="Description">
|
||
|
</div>
|
||
|
<div class="form-group" id="artist_type${i}">
|
||
|
<label>Artist</label>
|
||
|
|
||
|
<div class="form-check">
|
||
|
<input class="form-check-input" type="radio" name="artist_type" id="artist_exist${i}" value="new" checked>
|
||
|
<label class="form-check-label">
|
||
|
Existing artist
|
||
|
</label>
|
||
|
</div>
|
||
|
|
||
|
<select class="form-control form-control-sm mb-2" name="id_artist" id="artist_id${i}">
|
||
|
<option value="" disabled selected>Choose your artist</option>
|
||
|
<option value="" disabled>Artist list is empty</option>
|
||
|
</select>
|
||
|
|
||
|
<div class="form-check">
|
||
|
<input class="form-check-input" type="radio" name="artist_type" id="artist_new${i}" value="exist">
|
||
|
<label class="form-check-label">
|
||
|
New artist
|
||
|
</label>
|
||
|
</div>
|
||
|
|
||
|
<input class="form-control form-control-sm mb-2" type="text" name="name" id="artist_name${i}" placeholder="Artist Name">
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
$("#artist_name${i}").prop("disabled", true);
|
||
|
$('#artist_type${i}').click(function() {
|
||
|
if ($('#artist_new${i}').is(':checked')) {
|
||
|
$("#artist_name${i}").prop("disabled", false);
|
||
|
$("#artist_id${i}").prop("disabled", true);
|
||
|
}
|
||
|
|
||
|
else {
|
||
|
$("#artist_name${i}").prop("disabled", true);
|
||
|
$("#artist_id${i}").prop("disabled", false);
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
<input type="hidden" name="type" value="${row['type']}">
|
||
|
<input type="hidden" name="size" value="${row['size']}">
|
||
|
<input type="hidden" name="height" value="${int(row['height'])}">
|
||
|
<input type="hidden" name="width" value="${int(row['width'])}">
|
||
|
</div>
|
||
|
<button class="btn-sm btn-primary" type="submit">
|
||
|
Save
|
||
|
</button>
|
||
|
</form>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
% endfor
|
||
|
</div>
|
||
|
% endif
|
||
|
% endif
|
||
|
</div>
|