diff options
Diffstat (limited to 'askbot/templates/embed/list_widgets.html')
-rw-r--r-- | askbot/templates/embed/list_widgets.html | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/askbot/templates/embed/list_widgets.html b/askbot/templates/embed/list_widgets.html index 83de5871..cdbcd219 100644 --- a/askbot/templates/embed/list_widgets.html +++ b/askbot/templates/embed/list_widgets.html @@ -10,19 +10,24 @@ <th>Code</th> <th>Actions</th> </tr> + {% if request.is_secure() %} + {% set protocol='https' %} + {% else %} + {% set protocol='http' %} + {% endif %} {% if widget_name == 'ask' %} - {%for widget in widgets%} - <tr> - <td>{{widget.title}}</td> - <td> <script type="text/javascript" src="http://{{request.get_host()}}{% url render_ask_widget widget.id%}" ></script></td> - <td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td> - </tr> - {%endfor%} + {%for widget in widgets%} + <tr> + <td>{{widget.title}}</td> + <td> <script type="text/javascript" src="{{ protocol }}://{{request.get_host()}}{% url render_ask_widget widget.id%}" ></script></td> + <td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td> + </tr> + {%endfor%} {%else%} {%for widget in widgets%} <tr> <td>{{widget.title}}</td> - <td> <iframe src="http://{{request.get_host()}}{% url question_widget widget.id%}" > </iframe></td> + <td> <iframe src="{{ protocol }}://{{request.get_host()}}{% url question_widget widget.id%}" > </iframe></td> <td><a href="{% url edit_widget widget_name, widget.id %}">Edit</a> | <a href="{% url delete_widget widget_name, widget.id %}">Delete</a></td> </tr> {%endfor%} |