From 8876f3df273f2cdde20fb9b3855a05bea0213466 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 4 May 2013 19:24:13 +0200 Subject: [PATCH] planet: Add proper tag search function. --- static/js/site.js | 2 +- templates/admin-planet-compose.html | 73 +++++++++++++++++------------ templates/planet/posting.html | 6 +++ webapp/__init__.py | 3 +- webapp/backend/planet.py | 63 ++++++++++++++++++------- webapp/handlers_admin.py | 7 ++- 6 files changed, 102 insertions(+), 52 deletions(-) diff --git a/static/js/site.js b/static/js/site.js index f8e535cc..83c3bb30 100644 --- a/static/js/site.js +++ b/static/js/site.js @@ -48,7 +48,7 @@ if (/.*download-splash.*/i.test(window.location.href)) { $(".planet-search-autocomplete").typeahead({ source: function(query, process) { - $.get("http://planet.ipfire.org/api/search/autocomplete", { q: query }, function(data) { + $.get("/api/planet/search/autocomplete", { q: query }, function(data) { if (data.query == query) { process(data.results); } diff --git a/templates/admin-planet-compose.html b/templates/admin-planet-compose.html index 04fe68cd..edf8fab8 100644 --- a/templates/admin-planet-compose.html +++ b/templates/admin-planet-compose.html @@ -1,41 +1,54 @@ {% extends "admin-base.html" %} -{% block bodyA %} -
-

{{ _("Compose new entry") }}

-
- {% raw xsrf_form_html() %} - {% if entry.id %} - - {% end %} - - - - - - - - - - - - - -
{{ _("Title") }}
  - -
- - -
-
+{% block body %} + +
+ {% raw xsrf_form_html() %} + + {% if entry.id %} + + {% end %} + +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+
+ + {{ _("Preview") }} + {{ _("Cancel") }} +
+
+