Browse files

Added name search in plugin admin

  • Loading branch information...
1 parent b0841e8 commit eb8ea127cdc5a8114eac9db7436f27d5518624b8 @elpaso elpaso committed Oct 7, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −0 qgis-app/plugins/admin.py
  2. +3 −3 qgis-app/templates/search/search.html
View
1 qgis-app/plugins/admin.py
@@ -5,6 +5,7 @@
class PluginAdmin (admin.ModelAdmin):
list_filter = ('featured',)
list_display = ('name', 'featured', 'created_by', 'created_on', 'downloads', 'stable', 'experimental')
+ search_fields = ('name',)
class PluginVersionAdmin (admin.ModelAdmin):
View
6 qgis-app/templates/search/search.html
@@ -15,18 +15,18 @@
</table>
{% if query %}
- <h3>Results</h3>
+ <h3>Search results</h3>
{% for result in page.object_list %}
- <p>
+ <p class="search-item">
<a href="{{ result.object.get_absolute_url }}">{{ result.object }}</a>
</p>
{% empty %}
<p>No results found.</p>
{% endfor %}
{% if page.has_previous or page.has_next %}
- <div>
+ <div class="pagination">
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}

0 comments on commit eb8ea12

Please sign in to comment.