Skip to content

Commit

Permalink
Added name search in plugin admin
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 7, 2012
1 parent b0841e8 commit eb8ea12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions qgis-app/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions qgis-app/templates/search/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ <h2>Search</h2>
</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 %}
Expand Down

0 comments on commit eb8ea12

Please sign in to comment.