diff --git a/qgis-app/base/views/processing_view.py b/qgis-app/base/views/processing_view.py
index 076b89d2..b24b7520 100644
--- a/qgis-app/base/views/processing_view.py
+++ b/qgis-app/base/views/processing_view.py
@@ -315,7 +315,7 @@ def get_context_data(self, **kwargs):
context['count'] = self.get_queryset().count()
context['order_by'] = self.request.GET.get('order_by', None)
context['queries'] = self.request.GET.get('q', None)
- context['is_galery'] = self.request.GET.get('is_galery', None)
+ context['is_gallery'] = self.request.GET.get('is_gallery', None)
return context
def get_queryset(self):
@@ -325,16 +325,16 @@ def get_queryset(self):
def get_template_names(self):
context = self.get_context_data()
- is_galery = context['is_galery']
- if is_galery:
+ is_gallery = context['is_gallery']
+ if is_gallery:
self.paginate_by = settings.PAGINATION_DEFAULT_PAGINATION
return 'base/list_galery.html'
else:
return 'base/list.html'
def get_paginate_by(self, queryset):
- is_galery = self.request.GET.get('is_galery', None)
- if is_galery:
+ is_gallery = self.request.GET.get('is_gallery', None)
+ if is_gallery:
return settings.PAGINATION_DEFAULT_PAGINATION_HUB
return settings.PAGINATION_DEFAULT_PAGINATION
diff --git a/qgis-app/templates/base/base.html b/qgis-app/templates/base/base.html
index 36ad103c..1fac01b3 100644
--- a/qgis-app/templates/base/base.html
+++ b/qgis-app/templates/base/base.html
@@ -15,6 +15,9 @@
QGIS {{ resource_name }}
div.style-polaroid, div.span12.license {
margin-left: 1em;
}
+ div.span12.license {
+ margin-bottom: 5em;
+ }
.style-title {
margin-bottom: 0;
padding-bottom: 0;
diff --git a/qgis-app/templates/base/detail.html b/qgis-app/templates/base/detail.html
index 8aeec4a3..5a36080e 100644
--- a/qgis-app/templates/base/detail.html
+++ b/qgis-app/templates/base/detail.html
@@ -19,7 +19,7 @@ {{ object_detail.name }}
-
+
- Name
diff --git a/qgis-app/templates/base/list.html b/qgis-app/templates/base/list.html
index 75a051ef..5cc7eecd 100644
--- a/qgis-app/templates/base/list.html
+++ b/qgis-app/templates/base/list.html
@@ -141,7 +141,7 @@ {% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en
// galery or list view
const url = window.location.href.split('?')[0];
- const isGalery = new URLSearchParams(window.location.search).get("is_galery");
+ const isGalery = new URLSearchParams(window.location.search).get("is_gallery");
console.log(isGalery)
if (isGalery && isGalery === 'true') {
$('.list-grid').find('.is-galery').addClass('disabled')
@@ -154,7 +154,7 @@ {% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en
this.href = url;
})
$('.list-grid a.is-galery').each(function(){
- this.href = url + '?is_galery=true';
+ this.href = url + '?is_gallery=true';
})
// change color for sorted head
diff --git a/qgis-app/templates/base/list_galery.html b/qgis-app/templates/base/list_galery.html
index 2e9c6d05..ff9f1817 100644
--- a/qgis-app/templates/base/list_galery.html
+++ b/qgis-app/templates/base/list_galery.html
@@ -140,26 +140,26 @@
// Add arguments in pagination
const orderBy = new URLSearchParams(window.location.search).get("order_by");
const queries = new URLSearchParams(window.location.search).get("q");
- const is_galery = 'is_galery=true'
+ const is_gallery = 'is_gallery=true'
if (orderBy){
$(".pagination li a").each(function(){
- this.href += 'order_by=' + orderBy +'&&' + is_galery + '&&';
+ this.href += 'order_by=' + orderBy +'&&' + is_gallery + '&&';
})
}
if (queries){
$(".pagination li a").each(function(){
- this.href += 'q=' + queries +'&&' + is_galery + '&&';
+ this.href += 'q=' + queries +'&&' + is_gallery + '&&';
})
}
if (!orderBy && !queries){
$(".pagination li a").each(function(){
- this.href += is_galery + '&&';
+ this.href += is_gallery + '&&';
})
}
// galery or list view
const url = window.location.href.split('?')[0];
- const isGalery = new URLSearchParams(window.location.search).get("is_galery");
+ const isGalery = new URLSearchParams(window.location.search).get("is_gallery");
if (isGalery && isGalery === 'true') {
$('.list-grid').find('.is-galery').addClass('disabled')
} else {
@@ -170,7 +170,7 @@
this.href = url;
})
$('.list-grid a.is-galery').each(function(){
- this.href = url + '?is_galery=true';
+ this.href = url + '?is_gallery=true';
})
// edit search input from base template, in order to use it for styles
@@ -207,10 +207,10 @@
const order = $('div.filter-sort').find('a').attr('data')
const sort_by = $('div.filter-sort').find('select').val()
let current_query = new URLSearchParams(window.location.search).get("q");
- let is_galery = new URLSearchParams(window.location.search).get("is_galery");
+ let is_gallery = new URLSearchParams(window.location.search).get("is_gallery");
if (current_query === null) current_query = '';
- location.href = location.protocol + '//' + location.host + location.pathname + `?order_by=${order}${sort_by}&&is_galery=${is_galery}`
+ location.href = location.protocol + '//' + location.host + location.pathname + `?order_by=${order}${sort_by}&&is_gallery=${is_gallery}`
}
{% endblock %}
diff --git a/qgis-app/urls.py b/qgis-app/urls.py
index e4acdea4..e6863577 100644
--- a/qgis-app/urls.py
+++ b/qgis-app/urls.py
@@ -120,9 +120,9 @@
'/planet/',
# '/community-map/',
'/plugins/',
- '/styles/?is_galery=true',
- '/geopackages/?is_galery=true',
- '/models/?is_galery=true',
+ '/styles/?order_by=-upload_date&&is_gallery=true',
+ '/geopackages/?order_by=-upload_date&&is_gallery=true',
+ '/models/?order_by=-upload_date&&is_gallery=true',
FlatPage.objects.all(),
simplemenu.models.URLItem.objects.all(),
)