mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Merge minetest/bootstrap into master
This commit is contained in:
commit
f6384e2e15
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
|||||||
config.cfg
|
config.cfg
|
||||||
config.prod.cfg
|
config.prod.cfg
|
||||||
*.sqlite
|
*.sqlite
|
||||||
main.css
|
custom.css
|
||||||
tmp
|
tmp
|
||||||
log.txt
|
log.txt
|
||||||
*.rdb
|
*.rdb
|
||||||
|
9681
app/public/static/bootstrap.css
vendored
Normal file
9681
app/public/static/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
app/public/static/bootstrap.min.js
vendored
Normal file
7
app/public/static/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -8,4 +8,17 @@ $(function() {
|
|||||||
})
|
})
|
||||||
$(".not_mod, .not_game, .not_txp").show()
|
$(".not_mod, .not_game, .not_txp").show()
|
||||||
$(".not_" + $("#type").val().toLowerCase()).hide()
|
$(".not_" + $("#type").val().toLowerCase()).hide()
|
||||||
|
|
||||||
|
$("#forums").on('paste', function(e) {
|
||||||
|
try {
|
||||||
|
var pasteData = e.originalEvent.clipboardData.getData('text')
|
||||||
|
var url = new URL(pasteData);
|
||||||
|
if (url.hostname == "forum.minetest.net") {
|
||||||
|
$(this).val(url.searchParams.get("t"));
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Not a URL");
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
5
app/public/static/popper.min.js
vendored
Normal file
5
app/public/static/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -5,13 +5,25 @@
|
|||||||
* https://petprojects.googlecode.com/svn/trunk/GPL-LICENSE.txt
|
* https://petprojects.googlecode.com/svn/trunk/GPL-LICENSE.txt
|
||||||
*/
|
*/
|
||||||
(function($) {
|
(function($) {
|
||||||
|
function hide_error(input) {
|
||||||
|
var err = input.parent().parent().find(".invalid-remaining");
|
||||||
|
err.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_error(input, msg) {
|
||||||
|
var err = input.parent().parent().find(".invalid-remaining");
|
||||||
|
console.log(err.length);
|
||||||
|
err.text(msg);
|
||||||
|
err.show();
|
||||||
|
}
|
||||||
|
|
||||||
$.fn.selectSelector = function(source, name, select) {
|
$.fn.selectSelector = function(source, name, select) {
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
var selector = $(this),
|
var selector = $(this),
|
||||||
input = $('input[type=text]', this);
|
input = $('input[type=text]', this);
|
||||||
|
|
||||||
selector.click(function() { input.focus(); })
|
selector.click(function() { input.focus(); })
|
||||||
.delegate('.tag a', 'click', function() {
|
.delegate('.badge a', 'click', function() {
|
||||||
var id = $(this).parent().data("id");
|
var id = $(this).parent().data("id");
|
||||||
for (var i = 0; i < source.length; i++) {
|
for (var i = 0; i < source.length; i++) {
|
||||||
if (source[i].id == id) {
|
if (source[i].id == id) {
|
||||||
@ -23,13 +35,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function addTag(item) {
|
function addTag(item) {
|
||||||
var tag = $('<span class="tag"/>')
|
var tag = $('<span class="badge badge-pill badge-primary"/>')
|
||||||
.text(item.toString() + ' ')
|
.text(item.toString() + ' ')
|
||||||
.data("id", item.id)
|
.data("id", item.id)
|
||||||
.append('<a>x</a>')
|
.append('<a>x</a>')
|
||||||
.insertBefore(input);
|
.insertBefore(input);
|
||||||
input.attr("placeholder", null);
|
input.attr("placeholder", null);
|
||||||
select.find("option[value=" + item.id + "]").attr("selected", "selected")
|
select.find("option[value=" + item.id + "]").attr("selected", "selected")
|
||||||
|
hide_error(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
function recreate() {
|
function recreate() {
|
||||||
@ -42,6 +55,13 @@
|
|||||||
}
|
}
|
||||||
recreate();
|
recreate();
|
||||||
|
|
||||||
|
input.focusout(function(e) {
|
||||||
|
var value = input.val().trim()
|
||||||
|
if (value != "") {
|
||||||
|
show_error(input, "Please select an existing tag, it;s not possible to add custom ones.");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
input.keydown(function(e) {
|
input.keydown(function(e) {
|
||||||
if (e.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active)
|
if (e.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -92,7 +112,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
selector.click(function() { input.focus(); })
|
selector.click(function() { input.focus(); })
|
||||||
.delegate('.tag a', 'click', function() {
|
.delegate('.badge a', 'click', function() {
|
||||||
var id = $(this).parent().data("id");
|
var id = $(this).parent().data("id");
|
||||||
for (var i = 0; i < selected.length; i++) {
|
for (var i = 0; i < selected.length; i++) {
|
||||||
if (selected[i] == id) {
|
if (selected[i] == id) {
|
||||||
@ -113,13 +133,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addTag(id, value) {
|
function addTag(id, value) {
|
||||||
var tag = $('<span class="tag"/>')
|
var tag = $('<span class="badge badge-pill badge-primary"/>')
|
||||||
.text(value)
|
.text(value)
|
||||||
.data("id", id)
|
.data("id", id)
|
||||||
.append(' <a>x</a>')
|
.append(' <a>x</a>')
|
||||||
.insertBefore(input);
|
.insertBefore(input);
|
||||||
|
|
||||||
input.attr("placeholder", null);
|
input.attr("placeholder", null);
|
||||||
|
hide_error(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
function recreate() {
|
function recreate() {
|
||||||
@ -147,6 +168,18 @@
|
|||||||
|
|
||||||
result.change(readFromResult);
|
result.change(readFromResult);
|
||||||
|
|
||||||
|
input.focusout(function() {
|
||||||
|
var item = input.val();
|
||||||
|
if (item.length == 0) {
|
||||||
|
input.data("ui-autocomplete").search("");
|
||||||
|
} else if (item.match(/^([a-z0-9_]+)$/)) {
|
||||||
|
selectItem(item);
|
||||||
|
recreate();
|
||||||
|
input.val("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
input.keydown(function(e) {
|
input.keydown(function(e) {
|
||||||
if (e.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active)
|
if (e.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active)
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@ -159,7 +192,7 @@
|
|||||||
recreate();
|
recreate();
|
||||||
input.val("");
|
input.val("");
|
||||||
} else {
|
} else {
|
||||||
alert("Only lowercase alphanumeric and number names allowed.");
|
show_error(input, "Only lowercase alphanumeric and number names allowed.");
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,112 +1,3 @@
|
|||||||
h1 {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2, h3 {
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #0be;
|
|
||||||
font-weight: bold;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: #0df;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Containers */
|
|
||||||
|
|
||||||
.box {
|
|
||||||
border-radius: 5px;
|
|
||||||
margin: 15px 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box > h2, .box > h3 {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.5em 0.5em 0.5em 15px;
|
|
||||||
border-bottom: 1px solid #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box .box-body {
|
|
||||||
padding: 1em !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// .box form {
|
|
||||||
// padding: 1em;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.box_grey {
|
|
||||||
background: #333;
|
|
||||||
border: 1px solid #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ul_boxes {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ul_boxes > li {
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box_link {
|
|
||||||
display: block;
|
|
||||||
color: #ddd;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box_link:hover{
|
|
||||||
background: #3a3a3a;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
buttonset
|
|
||||||
*/
|
|
||||||
|
|
||||||
.buttonset, .buttonset li {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttonset {
|
|
||||||
margin: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button, .buttonset li a, input[type=submit] {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button, .buttonset li a, input[type=submit], input[type=text],
|
|
||||||
input[type=password], textarea, select, .bulletselector {
|
|
||||||
text-align: center;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0.4em 1em;
|
|
||||||
background: rgba(255,255,255,0.07);
|
|
||||||
border: 1px solid rgba(255,255,255,0.1);
|
|
||||||
color: #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
select > * {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=text], input[type=password], textarea, select, .bulletselector {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-autocomplete, ui-front {
|
.ui-autocomplete, ui-front {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
cursor:default;
|
cursor:default;
|
||||||
@ -133,74 +24,6 @@ input[type=text], input[type=password], textarea, select, .bulletselector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
|
||||||
min-width: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
select:not([multiple]) {
|
|
||||||
background: linear-gradient(#444, #333);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group label {
|
|
||||||
display: block;
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 0 8px 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group input, .form-group textarea, .form-group .bulletselector {
|
|
||||||
display: block;
|
|
||||||
min-width: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box .form-group input, .box .form-group textarea, .form-group .bulletselector {
|
|
||||||
min-width: 95%;
|
|
||||||
max-width: 95%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group textarea {
|
|
||||||
min-height: 200px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:hover, .buttonset li a:hover, input[type=submit]:hover {
|
|
||||||
background: rgba(255,255,255,0.13);
|
|
||||||
border: 1px solid rgba(255,255,255,0.17);
|
|
||||||
text-decoration: none;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn_green {
|
|
||||||
background: #363 !important;
|
|
||||||
border: 1px solid #473;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn_green:hover {
|
|
||||||
background: #474 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.linedbuttonset a {
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 4px 10px;
|
|
||||||
margin: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.linedbuttonset {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.linedbuttonset li {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 10px 10px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.bulletselector input {
|
.bulletselector input {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
@ -215,166 +38,14 @@ select:not([multiple]) {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
.bulletselector .tag {
|
.bulletselector .badge {
|
||||||
background: #375D81;
|
|
||||||
border-radius: 3px;
|
|
||||||
-moz-border-radius: 3px;
|
|
||||||
color: #FFF;
|
|
||||||
float: left;
|
float: left;
|
||||||
height: 15px;
|
padding: 0.4em 0.8em;
|
||||||
padding: 0.1em 0.4em 0.5em;
|
|
||||||
margin-right: 0.3em;
|
margin-right: 0.3em;
|
||||||
margin-bottom: 0.3em;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
.bulletselector .tag a {
|
|
||||||
color: #FFF;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.bulletselector .tag a:hover {
|
|
||||||
color: #0099CC;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.invalid-remaining {
|
||||||
/* Alerts */
|
display: none;
|
||||||
|
|
||||||
|
|
||||||
.alert .alert_right, .alert > form {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert {
|
|
||||||
padding: 10px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.alert_right:not(.button) {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert_right form {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, .button {
|
|
||||||
margin: 0;
|
|
||||||
background: 0;
|
|
||||||
border: 0;
|
|
||||||
border-left: 1px solid rgba(255,255,255,0.12);
|
|
||||||
border-radius: 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:hover, .button:hover {
|
|
||||||
border: 0;
|
|
||||||
border-left: 1px solid rgba(255,255,255,0.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#alerts {
|
|
||||||
list-style: none;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 15px;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#alerts .alert {
|
|
||||||
margin: 5px 0;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
#alerts .close {
|
|
||||||
float: right;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#alerts .close:hover {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert-error, .button-danger {
|
|
||||||
background: #933 !important;
|
|
||||||
border: 1px solid #c44 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert-warning {
|
|
||||||
background: #963;
|
|
||||||
border: 1px solid #c96;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert-primary {
|
|
||||||
background: #339;
|
|
||||||
border: 1px solid #66a;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert-success {
|
|
||||||
background: #161;
|
|
||||||
border: 1px solid #393;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.fancyTable {
|
|
||||||
font-family: "Arial Black", Gadget, sans-serif;
|
|
||||||
border: 2px solid #000000;
|
|
||||||
background-color: #4A4A4A;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.fancyTable td, table.fancyTable th {
|
|
||||||
border: 1px solid #4A4A4A;
|
|
||||||
padding: 3px 2px;
|
|
||||||
}
|
|
||||||
table.fancyTable tbody td {
|
|
||||||
font-size: 13px;
|
|
||||||
color: #E6E6E6;
|
|
||||||
}
|
|
||||||
table.fancyTable tr:nth-child(even) {
|
|
||||||
background: #888888;
|
|
||||||
}
|
|
||||||
table.fancyTable thead {
|
|
||||||
background: #000000;
|
|
||||||
border-bottom: 3px solid #000000;
|
|
||||||
}
|
|
||||||
table.fancyTable thead th {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #E6E6E6;
|
|
||||||
text-align: center;
|
|
||||||
border-left: 2px solid #4A4A4A;
|
|
||||||
}
|
|
||||||
table.fancyTable thead th:first-child {
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.fancyTable tfoot {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #E6E6E6;
|
|
||||||
background: #000000;
|
|
||||||
background: -moz-linear-gradient(top, #404040 0%, #191919 66%, #000000 100%);
|
|
||||||
background: -webkit-linear-gradient(top, #404040 0%, #191919 66%, #000000 100%);
|
|
||||||
background: linear-gradient(to bottom, #404040 0%, #191919 66%, #000000 100%);
|
|
||||||
border-top: 1px solid #4A4A4A;
|
|
||||||
}
|
|
||||||
table.fancyTable tfoot td {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.t-mll tr td:not(:first-child) {
|
.t-mll tr td:not(:first-child) {
|
||||||
@ -405,57 +76,6 @@ table.fancyTable tfoot td {
|
|||||||
color: #2c2;
|
color: #2c2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Aside
|
|
||||||
*/
|
|
||||||
|
|
||||||
.asideright {
|
|
||||||
float: right;
|
|
||||||
margin: 0 0 0 15px;
|
|
||||||
max-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.outsidecontainer {
|
|
||||||
position: absolute;
|
|
||||||
right: 102%;
|
|
||||||
top: 0;
|
|
||||||
width: intrinsic; /* Safari/WebKit uses a non-standard name */
|
|
||||||
width: -moz-max-content; /* Firefox/Gecko */
|
|
||||||
width: -webkit-max-content; /* Chrome */
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1490px) {
|
|
||||||
.outsidecontainer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.flatlist, .flatlist li {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flatlist li {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flatlist a {
|
|
||||||
display: block;
|
|
||||||
padding: 0.5em 20px;
|
|
||||||
color: #ddd;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flatlist a:hover {
|
|
||||||
background: #444;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-topalign td {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wiptopic a {
|
.wiptopic a {
|
||||||
color: #7ac;
|
color: #7ac;
|
||||||
}
|
}
|
||||||
|
41
app/scss/custom.scss
Normal file
41
app/scss/custom.scss
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
@import "components.scss";
|
||||||
|
@import "packages.scss";
|
||||||
|
@import "packagegrid.scss";
|
||||||
|
@import "comments.scss";
|
||||||
|
|
||||||
|
.dropdown-menu {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown:hover .dropdown-menu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link > img {
|
||||||
|
max-height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jumbotron {
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert .btn {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card .table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-download {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #00b05c;
|
||||||
|
border-color: #00b05c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-download:focus, .btn-download.focus {
|
||||||
|
-webkit-box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.5);
|
||||||
|
box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.5);
|
||||||
|
}
|
@ -1,6 +0,0 @@
|
|||||||
@import "page.scss";
|
|
||||||
@import "components.scss";
|
|
||||||
@import "nav.scss";
|
|
||||||
@import "packages.scss";
|
|
||||||
@import "packagegrid.scss";
|
|
||||||
@import "comments.scss";
|
|
@ -1,90 +0,0 @@
|
|||||||
nav {
|
|
||||||
margin: 0 auto 0 auto;
|
|
||||||
list-style: none;
|
|
||||||
background: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav .navbar-left {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav .navbar-left li {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav .navbar-right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul {
|
|
||||||
margin: 0 auto 0 auto;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav li {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav li a {
|
|
||||||
color: #ddd;
|
|
||||||
margin: 0;
|
|
||||||
padding: 1em 1em;
|
|
||||||
display: block;
|
|
||||||
border-left: 1px solid #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav li a:not([href]) {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul li:last-child a {
|
|
||||||
border-right: 1px solid #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a:hover {
|
|
||||||
color: #eee;
|
|
||||||
background: #444;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav img {
|
|
||||||
height: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
li.dropdown {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu {
|
|
||||||
display: none;
|
|
||||||
position: absolute;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
min-width:160px;
|
|
||||||
background: #333;
|
|
||||||
z-index: 1;
|
|
||||||
right: 0;
|
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown:hover ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown li {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown li a {
|
|
||||||
border: none;
|
|
||||||
border-top: 1px solid #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown li:last-child a {
|
|
||||||
border-bottom: 1px solid #444;
|
|
||||||
}
|
|
@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
.packagegridinfo h3 {
|
.packagegridinfo h3 {
|
||||||
color: white;
|
color: white;
|
||||||
|
font-size: 120%;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.packagegridinfo p {
|
.packagegridinfo p {
|
||||||
|
@ -37,34 +37,6 @@
|
|||||||
left: 15px;
|
left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar_container {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar_container .right, .sidebar_container .left{
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
top: 10px;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar_container .right {
|
|
||||||
right: 0;
|
|
||||||
width: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar_container .left {
|
|
||||||
right: 295px;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar_container .right > *:first-child, .sidebar_container .left > *:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.package-short-large {
|
.package-short-large {
|
||||||
font-size: 120%;
|
font-size: 120%;
|
||||||
}
|
}
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
html, body {
|
|
||||||
font-family: "Arial", sans-serif;
|
|
||||||
background: #222;
|
|
||||||
color: #ddd;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container, main, #alerts, footer {
|
|
||||||
width: 90%;
|
|
||||||
max-width: 1024px;
|
|
||||||
margin: auto;
|
|
||||||
padding: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
padding: 7px 0;
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clearboth {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1, header p, header form {
|
|
||||||
padding: 0 5px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
padding: 30px;
|
|
||||||
background: #258;
|
|
||||||
}
|
|
||||||
|
|
||||||
header p {
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header input {
|
|
||||||
margin: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
color: #999;
|
|
||||||
padding: 30px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer a {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer a:hover {
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
@ -20,7 +20,7 @@
|
|||||||
<select name="action">
|
<select name="action">
|
||||||
<option value="importmodlist" selected>Import forum topics</option>
|
<option value="importmodlist" selected>Import forum topics</option>
|
||||||
<option value="recalcscores">Recalculate package scores</option>
|
<option value="recalcscores">Recalculate package scores</option>
|
||||||
<!-- <option value="importscreenshots">Import screenshots from VCS</option> -->
|
<option value="importscreenshots">Import screenshots from VCS</option>
|
||||||
<!-- <option value="importdepends">Import dependencies from downloads</option> -->
|
<!-- <option value="importdepends">Import dependencies from downloads</option> -->
|
||||||
<!-- <option value="modprovides">Set provides to mod name</option> -->
|
<!-- <option value="modprovides">Set provides to mod name</option> -->
|
||||||
<!-- <option value="vcsrelease">Create VCS releases</option> -->
|
<!-- <option value="vcsrelease">Create VCS releases</option> -->
|
||||||
|
@ -6,19 +6,25 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
|
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/main.css">
|
<link rel="stylesheet" type="text/css" href="/static/bootstrap.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="/static/custom.css">
|
||||||
{% block headextra %}{% endblock %}
|
{% block headextra %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<ul class="nav navbar-nav navbar-left">
|
<a class="navbar-brand" href="/">{{ config.USER_APP_NAME }}</a>
|
||||||
<li><a href="/">{{ config.USER_APP_NAME }}</a></li>
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="navbarColor01">
|
||||||
|
<ul class="navbar-nav mr-auto">
|
||||||
{% for item in current_menu.children recursive %}
|
{% for item in current_menu.children recursive %}
|
||||||
{% if item.visible %}
|
{% if item.visible %}
|
||||||
<li{% if item.children %} class="dropdown"{% endif %}>
|
<li class="nav-item {% if item.children %} dropdown{% endif %}">
|
||||||
<a href="{{ item.url }}"
|
<a class="nav-link" href="{{ item.url }}"
|
||||||
{% if item.children %}
|
{% if item.children %}
|
||||||
class="dropdown-toggle"
|
class="dropdown-toggle"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
@ -39,42 +45,48 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<form class="form-inline my-2 my-lg-0" method="GET" action="/packages/">
|
||||||
|
{% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
|
||||||
|
<input class="form-control mr-sm-2" name="q" type="text" placeholder="Search {{ title | lower or 'all packages' }}" value="{{ query or ''}}">
|
||||||
|
<input class="btn btn-secondary my-2 my-sm-0 mr-sm-2" type="submit" value="Search" />
|
||||||
|
<input class="btn btn-primary my-2 my-sm-0" type="submit" name="lucky" value="Lucky" />
|
||||||
|
</form>
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<li><a href="{{ url_for('notifications_page') }}">
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('notifications_page') }}">
|
||||||
<img src="/static/notification{% if current_user.notifications %}_alert{% endif %}.svg" />
|
<img src="/static/notification{% if current_user.notifications %}_alert{% endif %}.svg" />
|
||||||
</a></li>
|
</a></li>
|
||||||
<li><a href="{{ url_for('create_edit_package_page') }}">+</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('create_edit_package_page') }}">+</a></li>
|
||||||
<li class="dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="dropdown-toggle"
|
<a class="nav-link dropdown-toggle"
|
||||||
data-toggle="dropdown"
|
data-toggle="dropdown"
|
||||||
role="button"
|
role="button"
|
||||||
aria-expanded="false">{{ current_user.display_name }}
|
aria-expanded="false">{{ current_user.display_name }}
|
||||||
<span class="caret"></span></a>
|
<span class="caret"></span></a>
|
||||||
|
|
||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
<li>
|
<li class="nav-item">
|
||||||
<a href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a>
|
<a class="nav-link" href="{{ url_for('user_profile_page', username=current_user.username) }}">Profile</a>
|
||||||
</li>
|
</li class="nav-item">
|
||||||
{% if current_user.canAccessTodoList() %}
|
{% if current_user.canAccessTodoList() %}
|
||||||
<li><a href="{{ url_for('todo_page') }}">Work Queue</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('todo_page') }}">Work Queue</a></li>
|
||||||
<li><a href="{{ url_for('user_list_page') }}">User list</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('user_list_page') }}">User list</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.rank == current_user.rank.ADMIN %}
|
{% if current_user.rank == current_user.rank.ADMIN %}
|
||||||
<li><a href="{{ url_for('admin_page') }}">Admin</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('admin_page') }}">Admin</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.rank == current_user.rank.MODERATOR %}
|
{% if current_user.rank == current_user.rank.MODERATOR %}
|
||||||
<li><a href="{{ url_for('tag_list_page') }}">Tag Editor</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('tag_list_page') }}">Tag Editor</a></li>
|
||||||
<li><a href="{{ url_for('license_list_page') }}">License Editor</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('license_list_page') }}">License Editor</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a href="{{ url_for('user.logout') }}">Sign out</a></li>
|
<li class="nav-item"><a class="nav-link" href="{{ url_for('user.logout') }}">Sign out</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ url_for('user.login') }}">Sign in</a></li>
|
<li><a class="nav-link" href="{{ url_for('user.login') }}">Sign in</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clearboth"></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@ -97,16 +109,22 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block container %}
|
{% block container %}
|
||||||
<main>
|
<main class="container mt-4">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<footer>
|
<footer class="container footer-copyright my-5 page-footer font-small text-center">
|
||||||
ContentDB © 2018 to <a href="https://rubenwardy.com/">rubenwardy</a> |
|
ContentDB © 2018 to <a href="https://rubenwardy.com/">rubenwardy</a> |
|
||||||
<a href="https://github.com/minetest/contentdb">GitHub</a> |
|
<a href="https://github.com/minetest/contentdb">GitHub</a> |
|
||||||
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
|
<a href="{{ url_for('flatpage', path='help') }}">Help</a> |
|
||||||
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
|
<a href="{{ url_for('flatpage', path='help/reporting') }}">Report / DMCA</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script src="/static/jquery.min.js"></script>
|
||||||
|
<script src="/static/popper.min.js"></script>
|
||||||
|
<script src="/static/bootstrap.min.js"></script>
|
||||||
|
{% block scriptextra %}{% endblock %}
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -61,7 +61,7 @@ Sign in
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3>Sign in with Github</h3>
|
<h3>Sign in with Github</h3>
|
||||||
<p><a class="button" href="{{ url_for('github_signin_page') }}">GitHub</a></p>
|
<p><a class="btn" href="{{ url_for('github_signin_page') }}">GitHub</a></p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ Sign in
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<p>Create an account using your forum account or email.</p>
|
<p>Create an account using your forum account or email.</p>
|
||||||
|
|
||||||
<a href="{{ url_for('user_claim_page') }}" class="button">{%trans%}Claim your account{%endtrans%}</a>
|
<a href="{{ url_for('user_claim_page') }}" class="btn">{%trans%}Claim your account{%endtrans%}</a>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,31 +5,26 @@ Welcome
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block container %}
|
{% block container %}
|
||||||
<header>
|
<header class="jumbotron">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>Content DB</h1>
|
<h1 class="display-3">{{ config.USER_APP_NAME }}</h1>
|
||||||
|
|
||||||
<p>
|
<p class="lead">
|
||||||
Minetest's official content repository.
|
Minetest's official content repository.
|
||||||
Browse {{ count }} packages,
|
Browse {{ count }} packages,
|
||||||
the majority of which are available under a free
|
the majority of which are available under a free
|
||||||
and open source license.
|
and open source license.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="get" action="/packages/">
|
|
||||||
<input type="text" name="q" value="{{ query or ''}}" />
|
|
||||||
<input type="submit" value="Search" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main class="container">
|
||||||
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
|
|
||||||
<h2>Popular</h2>
|
<h2>Popular</h2>
|
||||||
{{ render_pkggrid(popular) }}
|
{{ render_pkggrid(popular) }}
|
||||||
|
|
||||||
<a href="{{ url_for('packages_page') }}" class="button">Show More</a>
|
<a href="{{ url_for('packages_page') }}" class="btn">Show More</a>
|
||||||
|
|
||||||
<h2 style="margin-top:2em;">Newly Added</h2>
|
<h2 style="margin-top:2em;">Newly Added</h2>
|
||||||
{{ render_pkggrid(new) }}
|
{{ render_pkggrid(new) }}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
||||||
{% if field.type != 'HiddenField' and label_visible %}
|
{% if field.type != 'HiddenField' and label_visible %}
|
||||||
{% if not label %}{% set label=field.label.text %}{% endif %}
|
{% if not label %}{% set label=field.label.text %}{% endif %}
|
||||||
<label for="{{ field.id }}" class="control-label">{{ label|safe }}</label>
|
<label for="{{ field.id }}">{{ label|safe }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field(class_='form-control', **kwargs) }}
|
{{ field(class_='form-control', **kwargs) }}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
@ -13,9 +13,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro form_includes() -%}
|
{% macro form_scripts() -%}
|
||||||
<link href="/static/jquery-ui.min.css" rel="stylesheet" type="text/css">
|
<link href="/static/jquery-ui.min.css" rel="stylesheet" type="text/css">
|
||||||
<script src="/static/jquery.min.js"></script>
|
|
||||||
<script src="/static/jquery-ui.min.js"></script>
|
<script src="/static/jquery-ui.min.js"></script>
|
||||||
<script src="/static/tagselector.js"></script>
|
<script src="/static/tagselector.js"></script>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
@ -58,16 +57,17 @@
|
|||||||
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
||||||
{% if field.type != 'HiddenField' and label_visible %}
|
{% if field.type != 'HiddenField' and label_visible %}
|
||||||
{% if not label %}{% set label=field.label.text %}{% endif %}
|
{% if not label %}{% set label=field.label.text %}{% endif %}
|
||||||
<label for="{{ field.id }}" class="control-label">{{ label|safe }}</label>
|
<label for="{{ field.id }}">{{ label|safe }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="multichoice_selector bulletselector">
|
<div class="multichoice_selector bulletselector form-control">
|
||||||
<input type="text" placeholder="Start typing to see suggestions">
|
<input type="text" placeholder="Start typing to see suggestions">
|
||||||
<div class="clearboth"></div>
|
<div class="clearboth"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="invalid-remaining invalid-feedback"></div>
|
||||||
{{ field(class_='form-control', **kwargs) }}
|
{{ field(class_='form-control', **kwargs) }}
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for e in field.errors %}
|
{% for e in field.errors %}
|
||||||
<p class="help-block">{{ e }}</p>
|
<div class="invalid-feedback">{{ e }}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -77,13 +77,14 @@
|
|||||||
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
||||||
{% if field.type != 'HiddenField' and label_visible %}
|
{% if field.type != 'HiddenField' and label_visible %}
|
||||||
{% if not label %}{% set label=field.label.text %}{% endif %}
|
{% if not label %}{% set label=field.label.text %}{% endif %}
|
||||||
<label for="{{ field.id }}" class="control-label">{{ label|safe }}</label>
|
<label for="{{ field.id }}">{{ label|safe }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="metapackage_selector bulletselector">
|
<div class="metapackage_selector bulletselector form-control">
|
||||||
<input type="text" placeholder="Comma-seperated values">
|
<input type="text" placeholder="Comma-seperated values">
|
||||||
<div class="clearboth"></div>
|
<div class="clearboth"></div>
|
||||||
</div>
|
</div>
|
||||||
{{ field(class_='form-control', **kwargs) }}
|
{{ field(class_='form-control', **kwargs) }}
|
||||||
|
<div class="invalid-remaining invalid-feedback"></div>
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for e in field.errors %}
|
{% for e in field.errors %}
|
||||||
<p class="help-block">{{ e }}</p>
|
<p class="help-block">{{ e }}</p>
|
||||||
@ -96,13 +97,14 @@
|
|||||||
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
<div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}">
|
||||||
{% if field.type != 'HiddenField' and label_visible %}
|
{% if field.type != 'HiddenField' and label_visible %}
|
||||||
{% if not label %}{% set label=field.label.text %}{% endif %}
|
{% if not label %}{% set label=field.label.text %}{% endif %}
|
||||||
<label for="{{ field.id }}" class="control-label">{{ label|safe }}</label>
|
<label for="{{ field.id }}">{{ label|safe }}</label>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="deps_selector bulletselector">
|
<div class="deps_selector bulletselector form-control">
|
||||||
<input type="text" placeholder="Comma-seperated values">
|
<input type="text" placeholder="Comma-seperated values">
|
||||||
<div class="clearboth"></div>
|
<div class="clearboth"></div>
|
||||||
</div>
|
</div>
|
||||||
{{ field(class_='form-control', **kwargs) }}
|
{{ field(class_='form-control', **kwargs) }}
|
||||||
|
<div class="invalid-remaining invalid-feedback"></div>
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{% for e in field.errors %}
|
{% for e in field.errors %}
|
||||||
<p class="help-block">{{ e }}</p>
|
<p class="help-block">{{ e }}</p>
|
||||||
@ -134,7 +136,7 @@
|
|||||||
{% macro render_submit_field(field, label=None, tabindex=None) -%}
|
{% macro render_submit_field(field, label=None, tabindex=None) -%}
|
||||||
{% if not label %}{% set label=field.label.text %}{% endif %}
|
{% if not label %}{% set label=field.label.text %}{% endif %}
|
||||||
{#<button type="submit" class="form-control btn btn-default btn-primary">{{label}}</button>#}
|
{#<button type="submit" class="form-control btn btn-default btn-primary">{{label}}</button>#}
|
||||||
<input type="submit" value="{{label}}"
|
<input type="submit" value="{{label}}" class="btn btn-primary"
|
||||||
{% if tabindex %}tabindex="{{ tabindex }}"{% endif %}
|
{% if tabindex %}tabindex="{{ tabindex }}"{% endif %}
|
||||||
>
|
>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
@ -25,12 +25,24 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_threadlist(threads) -%}
|
{% macro render_threadlist(threads, list_group=False) -%}
|
||||||
<ul>
|
{% if not list_group %}<ul>{% endif %}
|
||||||
|
<li {% if list_group %}class="list-group-item"{% endif %}>
|
||||||
{% for t in threads %}
|
{% for t in threads %}
|
||||||
<li>{% if t.private %}🔒 {% endif %}<a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a> by {{ t.author.display_name }}</li>
|
{% if list_group %}
|
||||||
|
<a href="{{ url_for('thread_page', id=t.id) }}">
|
||||||
|
{% if t.private %}🔒 {% endif %}
|
||||||
|
{{ t.title }}
|
||||||
|
by {{ t.author.display_name }}
|
||||||
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><i>No threads found</i></li>
|
{% if t.private %}🔒 {% endif %}
|
||||||
|
<a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
|
||||||
|
by {{ t.author.display_name }}
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<i>No threads found</i>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% macro render_topics_table(topics, show_author=True) -%}
|
{% macro render_topics_table(topics, show_author=True) -%}
|
||||||
<table>
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Id</th>
|
<th>Id</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
@ -7,69 +7,10 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% from "macros/forms.html" import render_field, render_submit_field, form_scripts, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}
|
||||||
<h1>Create Package</h1>
|
|
||||||
|
|
||||||
<div class="box box_grey alert alert-info">
|
{% block scriptextra %}
|
||||||
Have you read the Package Inclusion Policy and Guidance yet?
|
{{ form_scripts() }}
|
||||||
|
|
||||||
<a class="alert_right button" href="{{ url_for('flatpage', path='policy_and_guidance') }}">View</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{% from "macros/forms.html" import render_field, render_submit_field, form_includes, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}
|
|
||||||
{{ form_includes() }}
|
|
||||||
{{ package_lists() }}
|
|
||||||
|
|
||||||
<form method="POST" action="" class="tableform">
|
|
||||||
{{ form.hidden_tag() }}
|
|
||||||
|
|
||||||
<h2 class="pkg_meta">Package</h2>
|
|
||||||
|
|
||||||
{{ render_field(form.type, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.name, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.title, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.shortDesc, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.desc, class_="pkg_meta") }}
|
|
||||||
{{ render_multiselect_field(form.tags, class_="pkg_meta") }}
|
|
||||||
<div class="pkg_meta">
|
|
||||||
{{ render_field(form.license, class_="not_txp") }}
|
|
||||||
</div>
|
|
||||||
{{ render_field(form.media_license, class_="pkg_meta") }}
|
|
||||||
|
|
||||||
<div class="pkg_meta">
|
|
||||||
<h2 class="not_txp">Dependency Info</h2>
|
|
||||||
|
|
||||||
{{ render_mpackage_field(form.provides_str, class_="not_txp", placeholder="Comma separated list") }}
|
|
||||||
{{ render_deps_field(form.harddep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
|
|
||||||
{{ render_deps_field(form.softdep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h2 class="pkg_meta">Repository and Links</h2>
|
|
||||||
|
|
||||||
<div class="pkg_wiz_1">
|
|
||||||
<p>Enter the repo URL for the package.
|
|
||||||
If the repo uses git then the metadata will be automatically imported.</p>
|
|
||||||
|
|
||||||
<p>Leave blank if you don't have a repo. Click skip if the import fails.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ render_field(form.repo, class_="pkg_repo") }}
|
|
||||||
|
|
||||||
<div class="pkg_wiz_1">
|
|
||||||
<a id="pkg_wiz_1_next" class="button button-primary">Next (Autoimport)</a>
|
|
||||||
<a id="pkg_wiz_1_skip" class="button button-default">Skip Autoimport</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pkg_wiz_2">
|
|
||||||
Importing... (This may take a while)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ render_field(form.website, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.issueTracker, class_="pkg_meta") }}
|
|
||||||
{{ render_field(form.forums, class_="pkg_meta") }}
|
|
||||||
<div class="pkg_meta">{{ render_submit_field(form.submit) }}</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script src="/static/simplemde.min.js"></script>
|
<script src="/static/simplemde.min.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/simplemde.min.css">
|
<link rel="stylesheet" type="text/css" href="/static/simplemde.min.css">
|
||||||
@ -90,3 +31,72 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<script src="/static/package_edit.js"></script>
|
<script src="/static/package_edit.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Create Package</h1>
|
||||||
|
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<a class="float-right btn btn-sm btn-default" href="{{ url_for('flatpage', path='policy_and_guidance') }}">View</a>
|
||||||
|
|
||||||
|
Have you read the Package Inclusion Policy and Guidance yet?
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{{ package_lists() }}
|
||||||
|
|
||||||
|
<form method="POST" action="" class="tableform">
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>Package</legend>
|
||||||
|
|
||||||
|
{{ render_field(form.type, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.name, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.title, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.shortDesc, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.desc, class_="pkg_meta") }}
|
||||||
|
{{ render_multiselect_field(form.tags, class_="pkg_meta") }}
|
||||||
|
<div class="pkg_meta">
|
||||||
|
{{ render_field(form.license, class_="not_txp") }}
|
||||||
|
</div>
|
||||||
|
{{ render_field(form.media_license, class_="pkg_meta") }}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset class="pkg_meta">
|
||||||
|
<legend class="not_txp">Package</legend>
|
||||||
|
|
||||||
|
{{ render_mpackage_field(form.provides_str, class_="not_txp", placeholder="Comma separated list") }}
|
||||||
|
{{ render_deps_field(form.harddep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
|
||||||
|
{{ render_deps_field(form.softdep_str, class_="not_txp not_game", placeholder="Comma separated list") }}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend class="pkg_meta">Repository and Links</legend>
|
||||||
|
|
||||||
|
<div class="pkg_wiz_1">
|
||||||
|
<p>Enter the repo URL for the package.
|
||||||
|
If the repo uses git then the metadata will be automatically imported.</p>
|
||||||
|
|
||||||
|
<p>Leave blank if you don't have a repo. Click skip if the import fails.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ render_field(form.repo, class_="pkg_repo") }}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="pkg_wiz_1">
|
||||||
|
<a id="pkg_wiz_1_next" class="btn btn-primary">Next (Autoimport)</a>
|
||||||
|
<a id="pkg_wiz_1_skip" class="btn btn-default">Skip Autoimport</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pkg_wiz_2">
|
||||||
|
Importing... (This may take a while)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ render_field(form.website, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.issueTracker, class_="pkg_meta") }}
|
||||||
|
{{ render_field(form.forums, class_="pkg_meta") }}
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<div class="pkg_meta">{{ render_submit_field(form.submit) }}</div>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<p>This action can be undone by the admin, but he'll be very annoyed!</p>
|
<p>This action can be undone by the admin, but he'll be very annoyed!</p>
|
||||||
|
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<input type="submit" value="Delete" class="button-danger" />
|
<input type="submit" value="Delete" class="btn-danger" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -5,35 +5,10 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form method="get" action="" class="plsearchform">
|
|
||||||
{% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
|
|
||||||
<input type="text" name="q" value="{{ query or ''}}" />
|
|
||||||
<input type="submit" value="Search" />
|
|
||||||
<input type="submit" name="lucky" value="I'm feeling lucky" />
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Found {{ packages_count }} packages.
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!--<aside class="box box_grey outsidecontainer">
|
|
||||||
<h3>Tags</h3>
|
|
||||||
|
|
||||||
<ul class="flatlist">
|
|
||||||
{% for t in tags %}
|
|
||||||
<li><a href="{{ url_for('packages_page', q=(query or '')+' tag:'+t.name, type=type) }}">
|
|
||||||
{{ t.title }}
|
|
||||||
</a></li>
|
|
||||||
{% else %}
|
|
||||||
<li><i>No tags available</i></ul>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</aside> -->
|
|
||||||
|
|
||||||
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
{{ render_pkggrid(packages) }}
|
{{ render_pkggrid(packages) }}
|
||||||
|
|
||||||
<ul class="buttonset linedbuttonset">
|
<ul class="btnset linedbuttonset">
|
||||||
{% if prev_url %}<li><a href="{{ prev_url }}">Previous</a></li>{% endif %}
|
{% if prev_url %}<li><a href="{{ prev_url }}">Previous</a></li>{% endif %}
|
||||||
<li>{{ page }} / {{ page_max }}</li>
|
<li>{{ page }} / {{ page_max }}</li>
|
||||||
{% if next_url %}<li><a href="{{ next_url }}">Next</a></li> {% endif %}
|
{% if next_url %}<li><a href="{{ next_url }}">Next</a></li> {% endif %}
|
||||||
|
@ -1,22 +1,51 @@
|
|||||||
|
{% set query=package.name %}
|
||||||
|
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ package.title }}
|
{{ package.title }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block container %}
|
||||||
|
<header class="jumbotron pb-3"
|
||||||
|
style="background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('{{ package.getMainScreenshotURL() }}');
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="display-3">{{ package.title }} by {{ package.author.display_name }}</h1>
|
||||||
|
|
||||||
|
<p class="lead">
|
||||||
|
{{ package.shortDesc }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="row" style="margin-top: 2rem;">
|
||||||
|
<div class="col">
|
||||||
|
</div>
|
||||||
|
<div class="btn-group-horizontal col-md-auto">
|
||||||
|
{% if package.repo %}<a class="btn btn-secondary" href="{{ package.repo }}">View Source</a>{% endif %}
|
||||||
|
{% if package.forums %}<a class="btn btn-secondary" href="https://forum.minetest.net/viewtopic.php?t={{ package.forums }}">Forums</a>{% endif %}
|
||||||
|
{% if package.issueTracker %}<a class="btn btn-secondary" href="{{ package.issueTracker }}">Issue Tracker</a>{% endif %}
|
||||||
|
{% if package.website %}<a class="btn btn-secondary" href="{{ package.website }}">Website</a>{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="container mt-4">
|
||||||
{% if not package.approved %}
|
{% if not package.approved %}
|
||||||
<div class="box box_grey alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<span class="icon_message"></span>
|
<span class="icon_message"></span>
|
||||||
{% if package.releases.count() == 0 %}
|
{% if package.releases.count() == 0 %}
|
||||||
|
<h4 class="alert-heading">Release Required</h4>
|
||||||
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
||||||
You need to create a release before this package can be approved.
|
<p>You need to create a release before this package can be approved.</p>
|
||||||
<p>
|
<p>
|
||||||
A release is a single downloadable version of your {{ package.type.value | lower }}.
|
A release is a single downloadable version of your {{ package.type.value | lower }}.
|
||||||
You need to create releases even if you use a rolling release development cycle,
|
You need to create releases even if you use a rolling release development cycle,
|
||||||
as Minetest needs them to check for updates.
|
as Minetest needs them to check for updates.
|
||||||
</p>
|
</p>
|
||||||
<a class="button" href="{{ package.getCreateReleaseURL() }}">Create Release</a>
|
<a class="btn" href="{{ package.getCreateReleaseURL() }}">Create Release</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
A release is required before this package can be approved.
|
A release is required before this package can be approved.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -38,11 +67,11 @@
|
|||||||
{% if not package.getDownloadRelease() %}
|
{% if not package.getDownloadRelease() %}
|
||||||
Please wait for the release to be approved.
|
Please wait for the release to be approved.
|
||||||
{% elif package.checkPerm(current_user, "APPROVE_NEW") %}
|
{% elif package.checkPerm(current_user, "APPROVE_NEW") %}
|
||||||
You can now approve this package if you're ready.
|
<form class="float-right" method="post" action="{{ package.getApproveURL() }}">
|
||||||
<form method="post" action="{{ package.getApproveURL() }}">
|
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<input type="submit" value="Approve" />
|
<input class="btn btn-sm btn-warning" type="submit" value="Approve" />
|
||||||
</form>
|
</form>
|
||||||
|
You can now approve this package if you're ready.
|
||||||
{% else %}
|
{% else %}
|
||||||
Please wait for the package to be approved.
|
Please wait for the package to be approved.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -51,13 +80,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if topic_error %}
|
{% if topic_error %}
|
||||||
<div class="box box_grey alert alert-{{ topic_error_lvl }}">
|
<div class="alert alert-{{ topic_error_lvl }}">
|
||||||
<span class="icon_message"></span>
|
<span class="icon_message"></span>
|
||||||
{{ topic_error | safe }}
|
{{ topic_error | safe }}
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if similar_topics %}
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Please make sure that this package has the right to
|
||||||
|
the name '{{ package.name }}'.
|
||||||
|
See the
|
||||||
|
<a href="/policy_and_guidance/">Inclusion Policy</a>
|
||||||
|
for more info.
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
|
{% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
|
||||||
{% if review_thread %}
|
{% if review_thread %}
|
||||||
<h2>{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}</h2>
|
<h2>{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}</h2>
|
||||||
@ -71,47 +110,57 @@
|
|||||||
{% from "macros/threads.html" import render_thread %}
|
{% from "macros/threads.html" import render_thread %}
|
||||||
{{ render_thread(review_thread, current_user) }}
|
{{ render_thread(review_thread, current_user) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="box box_grey alert alert-info">
|
<div class="alert alert-info">
|
||||||
|
<a class="float-right btn btn-sm btn-info" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
|
||||||
|
|
||||||
Privately ask a question or give feedback
|
Privately ask a question or give feedback
|
||||||
|
<div style="clear:both;"></div>
|
||||||
<a class="alert_right button" href="{{ url_for('new_thread_page', pid=package.id, title='Package approval comments') }}">Open Thread</a>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h1>{{ package.title }} by {{ package.author.display_name }}</h1>
|
<aside class="float-right ml-4" style="width: 18rem;">
|
||||||
|
{% if package.getDownloadRelease() %}
|
||||||
<ul class="screenshot_list">
|
<a class="btn btn-download btn-lg btn-block"
|
||||||
{% for ss in package.screenshots %}
|
href="{{ package.getDownloadURL() }}" class="btn_green">
|
||||||
{% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %}
|
Download
|
||||||
<li>
|
|
||||||
<a href="{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}">
|
|
||||||
<img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" />
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
{% else %}
|
||||||
|
No download available.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<aside class="asideright box box_grey">
|
<div class="card my-4">
|
||||||
<h3>Details</h3>
|
<div class="card-header">
|
||||||
|
Details
|
||||||
|
<div class="btn-group float-right">
|
||||||
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
||||||
|
<a class="btn btn-default btn-sm mx-1" href="{{ package.getEditURL() }}">Edit</a>
|
||||||
|
{% endif %}
|
||||||
|
{# {% if current_user.is_authenticated %}
|
||||||
|
<a class="btn btn-default btn-sm mx-1" href="{{ package.getCreateEditRequestURL() }}">Suggest Changes</a>
|
||||||
|
{% endif %} #}
|
||||||
|
{% if package.checkPerm(current_user, "DELETE_PACKAGE") %}
|
||||||
|
<a class="btn btn-danger btn-sm mx-1" href="{{ package.getDeleteURL() }}">Delete</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="box-body">
|
</div>
|
||||||
{% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
|
{% if not package.license.is_foss and not package.media_license.is_foss and package.type != package.type.TXP %}
|
||||||
<div class="box box_grey alert alert-error" style="margin-top: 0;">
|
{% set package_warning="Non-free code and media." %}
|
||||||
<b>Warning:</b> Non-free code and media.
|
|
||||||
</div>
|
|
||||||
{% elif not package.license.is_foss and package.type != package.type.TXP %}
|
{% elif not package.license.is_foss and package.type != package.type.TXP %}
|
||||||
<div class="box box_grey alert alert-error" style="margin-top: 0;">
|
{% set package_warning="Non-free code." %}
|
||||||
<b>Warning:</b> Non-free code.
|
|
||||||
</div>
|
|
||||||
{% elif not package.media_license.is_foss %}
|
{% elif not package.media_license.is_foss %}
|
||||||
<div class="box box_grey alert alert-error" style="margin-top: 0;">
|
{% set package_warning="Non-free media." %}
|
||||||
<b>Warning:</b> Non-free media.
|
{% endif %}
|
||||||
|
{% if package_warning %}
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<b>Warning:</b> {{ package_warning }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table>
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ package.name }}</td>
|
<td>{{ package.name }}</td>
|
||||||
@ -120,7 +169,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Provides</td>
|
<td>Provides</td>
|
||||||
<td>{% for meta in package.provides %}
|
<td>{% for meta in package.provides %}
|
||||||
<a href="{{ url_for('meta_package_page', name=meta.name) }}">{{ meta.name }}</a>
|
<a class="badge badge-primary"
|
||||||
|
href="{{ url_for('meta_package_page', name=meta.name) }}">{{ meta.name }}</a>
|
||||||
{%- if not loop.last %}
|
{%- if not loop.last %}
|
||||||
,
|
,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -156,120 +206,122 @@
|
|||||||
<td>Added</td>
|
<td>Added</td>
|
||||||
<td>{{ package.created_at | datetime }}</td>
|
<td>{{ package.created_at | datetime }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Tags</td>
|
||||||
|
<td>
|
||||||
|
{% for t in package.tags %}
|
||||||
|
<span class="badge badge-primary">{{ t.title }}</span>
|
||||||
|
{% else %}
|
||||||
|
<i>No tags.</i>
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="buttonset linedbuttonset">
|
|
||||||
{% if package.getDownloadRelease() %}<li><a href="{{ package.getDownloadURL() }}" class="btn_green">Download</a></li>{% endif %}
|
|
||||||
{% if package.repo %}<li><a href="{{ package.repo }}">View Source</a></li>{% endif %}
|
|
||||||
{% if package.forums %}<li><a href="https://forum.minetest.net/viewtopic.php?t={{ package.forums }}">Forums</a></li>{% endif %}
|
|
||||||
{% if package.issueTracker %}<li><a href="{{ package.issueTracker }}">Issue Tracker</a></li>{% endif %}
|
|
||||||
{% if package.website %}<li><a href="{{ package.website }}">Website</a></li>{% endif %}
|
|
||||||
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
|
||||||
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
|
||||||
<li><a href="{{ package.getNewScreenshotURL() }}">Add screenshot</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{# {% if current_user.is_authenticated %}
|
|
||||||
<li><a href="{{ package.getCreateEditRequestURL() }}">Suggest Changes</a></li>
|
|
||||||
{% endif %} #}
|
|
||||||
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
|
||||||
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
|
|
||||||
<li><a href="{{ url_for('new_thread_page', pid=package.id) }}">Open Thread</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if package.checkPerm(current_user, "DELETE_PACKAGE") %}
|
|
||||||
<li><a href="{{ package.getDeleteURL() }}">Delete</a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
|
||||||
|
|
||||||
<p class="package-short-large">{{ package.shortDesc }}</p>
|
{% if package.type == package.type.MOD %}
|
||||||
|
<div class="card my-4">
|
||||||
|
<div class="card-header">Dependencies</div>
|
||||||
|
<div class="card-body">
|
||||||
|
{% for dep in package.dependencies %}
|
||||||
|
{% if dep.optional %}
|
||||||
|
{% set color="secondary" %}
|
||||||
|
{% else %}
|
||||||
|
{% set color="primary" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{{ package.desc | markdown }}
|
{%- if dep.package %}
|
||||||
|
<a class="badge badge-{{ color }}"
|
||||||
|
href="{{ dep.package.getDetailsURL() }}">
|
||||||
|
{{ dep.package.title }} by {{ dep.package.author.display_name }}
|
||||||
|
{% elif dep.meta_package %}
|
||||||
|
<a class="badge badge-{{ color }}"
|
||||||
|
href="{{ url_for('meta_package_page', name=dep.meta_package.name) }}">
|
||||||
|
{{ dep.meta_package.name }}
|
||||||
|
{% else %}
|
||||||
|
{{ "Excepted package or meta_package in dep!" | throw }}
|
||||||
|
{% endif %}</a>
|
||||||
|
{% else %}
|
||||||
|
<i>No dependencies</i>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h3>Releases</h3>
|
<div class="card my-4">
|
||||||
|
<div class="card-header">
|
||||||
<ul>
|
Releases
|
||||||
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
||||||
|
<a class="float-right"
|
||||||
|
href="{{ package.getCreateReleaseURL() }}">+</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
{% for rel in releases %}
|
{% for rel in releases %}
|
||||||
{% if rel.approved or package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
{% if rel.approved or package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
||||||
<li>
|
<li class="list-group-item list-group-item-action">
|
||||||
{% if not rel.approved %}<i>{% endif %}
|
|
||||||
|
|
||||||
<a href="{{ rel.getDownloadURL() }}">{{ rel.title }}</a>{% if rel.commit_hash %}
|
|
||||||
[{{ rel.commit_hash | truncate(5, end='') }}]{% endif %},
|
|
||||||
created {{ rel.releaseDate | datetime }}.
|
|
||||||
{% if rel.task_id %}
|
|
||||||
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
|
||||||
{% elif not rel.approved %}
|
|
||||||
Waiting for approval.
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") or package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
||||||
<a href="{{ rel.getEditURL() }}">Edit
|
<a class="btn btn-sm btn-primary float-right" href="{{ rel.getEditURL() }}">Edit
|
||||||
{% if not rel.task_id and not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
{% if not rel.task_id and not rel.approved and package.checkPerm(current_user, "APPROVE_RELEASE") %}
|
||||||
/ Approve
|
/ Approve
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not rel.approved %}<i>{% endif %}
|
||||||
|
|
||||||
|
<a href="{{ rel.getDownloadURL() }}">{{ rel.title }}</a>{% if rel.commit_hash %}
|
||||||
|
[{{ rel.commit_hash | truncate(5, end='') }}]{% endif %}<br>
|
||||||
|
<small>created {{ rel.releaseDate | datetime }}.</small>
|
||||||
|
{% if rel.task_id %}
|
||||||
|
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
||||||
|
{% elif not rel.approved %}
|
||||||
|
Waiting for approval.
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if not rel.approved %}</i>{% endif %}
|
{% if not rel.approved %}</i>{% endif %}
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<li>No releases available.</li>
|
<li class="list-group-item">No releases available.</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3>Tags</h3>
|
<div class="card my-4"">
|
||||||
<ul>
|
<div class="card-header">
|
||||||
{% for t in package.tags %}
|
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
|
||||||
<li>{{ t.title }}</li>
|
<a class="float-right"
|
||||||
{% else %}
|
href="{{ url_for('new_thread_page', pid=package.id) }}">+</a>
|
||||||
<li>No tags.</li>
|
{% endif %}
|
||||||
{% endfor %}
|
Threads
|
||||||
|
</div>
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
|
{% from "macros/threads.html" import render_threadlist %}
|
||||||
|
{{ render_threadlist(threads, list_group=True) }}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
<!-- <table class="table-topalign">
|
<ul class="screenshot_list mb-4">
|
||||||
<tr>
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
||||||
<td> -->
|
<a class="btn btn-primary float-right" href="{{ package.getNewScreenshotURL() }}">Add screenshot</a>
|
||||||
<h3>Dependencies</h3>
|
{% endif %}
|
||||||
<ul>
|
{% for ss in package.screenshots %}
|
||||||
{% for dep in package.dependencies %}
|
{% if ss.approved or package.checkPerm(current_user, "ADD_SCREENSHOTS") %}
|
||||||
<li>
|
<li>
|
||||||
{%- if dep.package %}
|
<a href="{% if package.checkPerm(current_user, 'ADD_SCREENSHOTS') %}{{ ss.getEditURL() }}{% else %}{{ ss.url }}{% endif %}">
|
||||||
<a href="{{ dep.package.getDetailsURL() }}">{{ dep.package.title }}</a> by {{ dep.package.author.display_name }}
|
<img src="{{ ss.getThumbnailURL() }}" alt="{{ ss.title }}" />
|
||||||
{% elif dep.meta_package %}
|
</a>
|
||||||
<a href="{{ url_for('meta_package_page', name=dep.meta_package.name) }}">{{ dep.meta_package.name }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ "Excepted package or meta_package in dep!" | throw }}
|
|
||||||
{% endif %}
|
|
||||||
{% if dep.optional %}
|
|
||||||
[optional]
|
|
||||||
{% endif %}
|
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
|
||||||
<li><i>No dependencies</i></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
<!-- </td>
|
|
||||||
<td>
|
|
||||||
<h3>Required by</h3>
|
|
||||||
<ul>
|
|
||||||
{% for p in package.dependents %}
|
|
||||||
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }}</li>
|
|
||||||
{% else %}
|
|
||||||
{% if not package.softdependents %}
|
|
||||||
<li>No dependents.</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for p in package.softdependents %}
|
|
||||||
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }}</a> by {{ p.author.display_name }} [optional]</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
|
||||||
</tr>
|
{{ package.desc | markdown }}
|
||||||
</table> -->
|
|
||||||
|
<div style="clear: both;"></div>
|
||||||
|
|
||||||
{#
|
{#
|
||||||
{% if current_user.is_authenticated or requests %}
|
{% if current_user.is_authenticated or requests %}
|
||||||
@ -290,25 +342,14 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
{% if alternatives %}
|
{% if alternatives %}
|
||||||
<h3>Alternatives</h3>
|
<h3>Related</h3>
|
||||||
<ul>
|
|
||||||
{% for p in alternatives %}
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
<li><a href="{{ p.getDetailsURL() }}">{{ p.title }} by {{ p.author.display_name }}</a></li>
|
{{ render_pkggrid(alternatives) }}
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if similar_topics %}
|
{% if similar_topics %}
|
||||||
<h3>Similar Forum Topics</h3>
|
<h3>Similar Forum Topics</h3>
|
||||||
{% if not package.approved and package.type == package.type.MOD %}
|
|
||||||
<div class="box box_grey alert alert-warning">
|
|
||||||
Please make sure that this package has the right to
|
|
||||||
the name '{{ package.name }}'.
|
|
||||||
See the
|
|
||||||
<a href="/policy_and_guidance/">Inclusion Policy</a>
|
|
||||||
for more info.
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for t in similar_topics %}
|
{% for t in similar_topics %}
|
||||||
<li>
|
<li>
|
||||||
@ -321,15 +362,5 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</main>
|
||||||
{% if threads %}
|
|
||||||
<h3>Threads</h3>
|
|
||||||
|
|
||||||
{% if package.approved and package.checkPerm(current_user, "CREATE_THREAD") %}
|
|
||||||
<p><a href="{{ url_for('new_thread_page', pid=package.id) }}">Open Thread</a></p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% from "macros/threads.html" import render_threadlist %}
|
|
||||||
{{ render_threadlist(threads) }}
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -19,7 +19,7 @@ Creating an Account
|
|||||||
Please log out to continue.
|
Please log out to continue.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ url_for('user.logout', next=url_for('user_claim_page')) }}" class="button">Logout</a>
|
<a href="{{ url_for('user.logout', next=url_for('user_claim_page')) }}" class="btn">Logout</a>
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
@ -108,7 +108,7 @@ Creating an Account
|
|||||||
options.
|
options.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a class="button" href="{{ url_for('user.register') }}">Register</a>
|
<a class="btn" href="{{ url_for('user.register') }}">Register</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -7,17 +7,19 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
|
{% if not current_user.is_authenticated and user.rank == user.rank.NOT_JOINED and user.forums_username %}
|
||||||
<div class="box box_grey alert alert-info">
|
<div class="alert alert-info alert alert-info">
|
||||||
Is this you? Claim your account now!
|
<a class="float-right btn btn-default btn-sm"
|
||||||
|
href="{{ url_for('user_claim_page', username=user.forums_username) }}">Claim</a>
|
||||||
|
|
||||||
<a class="alert_right button" href="{{ url_for('user_claim_page', username=user.forums_username) }}">Claim</a>
|
Is this you? Claim your account now!
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="box box_grey">
|
<div class="row mb-3">
|
||||||
<h2>{{ user.display_name }}</h2>
|
<div class="col-sm-6">
|
||||||
|
<div class="card">
|
||||||
<table class="box-body">
|
<h2 class="card-header">{{ user.display_name }}</h2>
|
||||||
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td>Rank:</td>
|
<td>Rank:</td>
|
||||||
<td>
|
<td>
|
||||||
@ -64,15 +66,15 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if form %}
|
{% if form %}
|
||||||
{% from "macros/forms.html" import render_field, render_submit_field %}
|
{% from "macros/forms.html" import render_field, render_submit_field %}
|
||||||
<div class="box box_grey">
|
<div class="col-sm-6">
|
||||||
<h2>Edit Details</h2>
|
<div class="card">
|
||||||
|
<h2 class="card-header">Edit Details</h2>
|
||||||
|
<div class="card-body">
|
||||||
<form action="" method="POST" class="form box-body" role="form">
|
<form action="" method="POST" class="form box-body" role="form">
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 col-md-5 col-lg-4">
|
|
||||||
{{ form.hidden_tag() }}
|
{{ form.hidden_tag() }}
|
||||||
|
|
||||||
{% if user.checkPerm(current_user, "CHANGE_DNAME") %}
|
{% if user.checkPerm(current_user, "CHANGE_DNAME") %}
|
||||||
@ -89,28 +91,27 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ render_submit_field(form.submit, tabindex=280) }}
|
{{ render_submit_field(form.submit, tabindex=280) }}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
{{ render_pkggrid(packages, show_author=False) }}
|
{{ render_pkggrid(packages, show_author=False) }}
|
||||||
|
|
||||||
{% if topics_to_add %}
|
{% if topics_to_add %}
|
||||||
<div class="box box_grey">
|
<div class="card mt-3">
|
||||||
<h2>Unadded Packages</h2>
|
<h2 class="card-header">Unadded Packages</h2>
|
||||||
|
|
||||||
<div class="box-body">
|
<p class="card-body">
|
||||||
<p>
|
|
||||||
List of your forum topics which do not have a matching package.
|
List of your forum topics which do not have a matching package.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% from "macros/topics.html" import render_topics_table %}
|
{% from "macros/topics.html" import render_topics_table %}
|
||||||
{{ render_topics_table(topics_to_add, show_author=False) }}
|
{{ render_topics_table(topics_to_add, show_author=False) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -153,9 +153,10 @@ def package_page(package):
|
|||||||
alternatives = Package.query \
|
alternatives = Package.query \
|
||||||
.filter_by(name=package.name, type=PackageType.MOD, soft_deleted=False) \
|
.filter_by(name=package.name, type=PackageType.MOD, soft_deleted=False) \
|
||||||
.filter(Package.id != package.id) \
|
.filter(Package.id != package.id) \
|
||||||
.order_by(db.asc(Package.title)) \
|
.order_by(db.desc(Package.score)) \
|
||||||
.all()
|
.all()
|
||||||
|
|
||||||
|
|
||||||
show_similar_topics = current_user == package.author or \
|
show_similar_topics = current_user == package.author or \
|
||||||
package.checkPerm(current_user, Permission.APPROVE_NEW)
|
package.checkPerm(current_user, Permission.APPROVE_NEW)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user