fixing swift bugs introduced with ui refactor

Change-Id: I94b0c7277ef5c7f806b97d23d97a27eab9caeb60
This commit is contained in:
Tres Henry
2011-11-15 15:57:12 -08:00
parent 7aaa59270d
commit 6ffcfea805
12 changed files with 43 additions and 30 deletions

View File

@@ -23,6 +23,7 @@ import logging
from cloudfiles.errors import ContainerNotEmpty
from django import shortcuts
from django.contrib import messages
from django.utils.translation import ugettext as _
from horizon import api
from horizon import forms

View File

@@ -26,7 +26,6 @@ import logging
from django import http
from django.contrib.auth.decorators import login_required
from django import shortcuts
from django.utils.translation import ugettext as _
from horizon import api
from horizon.dashboards.nova.containers.forms import (DeleteContainer,

View File

@@ -1,10 +1,10 @@
{%load i18n%}
{% load i18n %}
<form id="form_delete_{{container.name}}" action="." class="form-delete" method="post">
{% csrf_token %}
{% for hidden in form.hidden_fields %}
{{hidden}}
{{ hidden }}
{% endfor %}
<input name="container_name" type="hidden" value="{{container.name}}" />
<input id="delete_{{container.name}}" class="btn small delete" title="Container: {{container.name}}" type="submit" value="{%trans "Delete"%}" />
<input name="container_name" type="hidden" value="{{ container.name }}" />
<input id="delete_{{ container.name }}" class="btn small danger delete" title="Container: {{ container.name }}" type="submit" value="{% trans "Delete" %}" />
</form>

View File

@@ -13,9 +13,9 @@
<td>{{ container.name }}</td>
<td id="actions">
<ul>
<li class="form">{% include "nova/containers/_delete.html" with form=delete_form %}</li>
<li><a class="btn small" href="{% url horizon:nova:containers:object_index container.name %}">{% trans "List Objects" %}</a></li>
<li><a class="btn small" href="{% url horizon:nova:containers:object_upload container.name %}">{% trans "Upload Object"%}</a></li>
<li><a class="btn small primary" href="{% url horizon:nova:containers:object_upload container.name %}">{% trans "Upload Object"%}</a></li>
<li class="form">{% include "nova/containers/_delete.html" with form=delete_form %}</li>
</ul>
</td>
</tr>

View File

@@ -1,5 +1,5 @@
{% extends 'nova/base.html' %}
{%load i18n%}
{% load i18n %}
{% block sidebar %}
{% with current_sidebar="containers" %}
@@ -14,6 +14,15 @@
{% endblock page_header %}
{% block dash_main %}
{% if containers %}
{% include 'nova/containers/_list.html' %}
<a class="btn small" href="{% url horizon:nova:containers:create %}">{% trans "Create New Container"%}</a>
{% else %}
<div class="alert-message block-message info">
<p>
<strong>{% trans "Info: " %}</strong>
{% trans "There are currently no containers."%}
<a class="btn small" href="{% url horizon:nova:containers:create %}">{% trans "Create New Container" %}</a>
</p>
</div>
{% endif %}
{% endblock %}

View File

@@ -1,8 +1,8 @@
{%load i18n%}
{% load i18n %}
<form id="form_delete_{{ object.name }}" class="form-delete" action="." method="post">
{% csrf_token %}
{% for hidden in form.hidden_fields %}
{{hidden}}
{{ hidden }}
{% endfor %}
<input name="object_name" type="hidden" value="{{ object.name }}" />
<input id="delete_{{ object.name }}" class="btn small danger delete" title="Object: {{ object.name }}" type="submit" value="{% trans "Delete"%}" />

View File

@@ -1,13 +1,13 @@
{%load i18n%}
<form id="object_form" action="{% block form_action %}{% endblock %}" method="post">
{% load i18n %}
<form id="object_form" enctype="multipart/form-data" action="{% block form_url %}{% endblock %}" method="post">
{% csrf_token %}
<fieldset>
{% for hidden in form.hidden_fields %}
{{hidden}}
{{ hidden }}
{% endfor %}
{% for field in form.visible_fields %}
<div class="clearfix{% if field.errors %} error{% endif %}">
{{field.label_tag}}
{{ field.label_tag }}
{% if field.errors %}
{% for error in field.errors %}
<span class="help-inline">{{error}}</span>
@@ -15,7 +15,7 @@
{% endif %}
<span class="help-block">{{field.help_text}}</span>
<div class="input">
{{field}}
{{ field }}
</div>
</div>
{% endfor %}

View File

@@ -13,8 +13,8 @@
<td>{{ object.name }}</td>
<td id="actions">
<ul>
<li><a class="btn small primary" href="{% url horizon:nova:containers:object_download container_name object.name %}">{% trans "Download"%}</a>
<li><a class="btn small" href="{% url horizon:nova:containers:object_copy container_name object.name %}">{% trans "Copy"%}</a></li>
<li><a class="btn small" href="{% url horizon:nova:containers:object_download container_name object.name %}">{% trans "Download"%}</a>
<li class="form">{% include "nova/objects/_delete.html" with form=delete_form %}</li>
</ul>
</td>

View File

@@ -1,11 +1,11 @@
{% extends 'nova/keypairs/_form.html' %}
{%load i18n%}
{% extends 'nova/objects/_form.html' %}
{% load i18n %}
{% block form_action %}{% url horizon:nova:containers:object_upload container_name %}{% endblock %}
{% block modal-footer %}
<div class="modal-footer">
<input class="btn primary pull-right" type="submit" value="{%trans "Upload Object"%}" />
<input class="btn primary pull-right" type="submit" value="{% trans "Upload Object" %}" />
<a href="#" class="btn secondary cancel close">Cancel</a>
</div>
{% endblock %}

View File

@@ -19,7 +19,11 @@
{% else %}
<div class="alert-message block-message info">
{% url horizon:nova:containers:object_upload container_name as dash_obj_up_url %}
<p><strong>{% trans "Info: "%}</strong>{% trans "There are currently no objects in the container."%} <a class="btn small" href='{{dash_obj_up_url}}'>{% trans "Object Upload Page"%}</a></p>
<p>
<strong>{% trans "Info: "%}</strong>
{% trans "There are currently no objects in the container."%}
<a class="btn small" href='{{dash_obj_up_url}}'>{% trans "Object Upload Page"%}</a>
</p>
</div>
{% endif %}
{% endblock %}

View File

@@ -1,5 +1,5 @@
{% extends 'nova/base.html' %}
{%load i18n%}
{% load i18n %}
{% block sidebar %}
{% with current_sidebar="containers" %}
@@ -14,7 +14,7 @@
{% block dash_main %}
<div id="create_container_form" class="modal static_page">
<div class="modal-header">
<h3>Object Upload: <small>Container: {{container_name}}</h3>
<h3>Object Upload: <small>Container: {{ container_name }}</h3>
</div>
<div class="modal-body">
<div class="left">

View File

@@ -1,21 +1,21 @@
{%load i18n%}
{% load i18n %}
<form action="{% block form_action %}{% endblock %}" method="post">
{% csrf_token %}
<fieldset>
{% for hidden in form.hidden_fields %}
{{hidden}}
{{ hidden }}
{% endfor %}
{% for field in form.visible_fields %}
<div class="clearfix{% if field.errors %} error{% endif %}">
{{field.label_tag}}
{{ field.label_tag }}
{% if field.errors %}
{% for error in field.errors %}
<span class="help-inline">{{error}}</span>
<span class="help-inline">{{ error }}</span>
{% endfor %}
{% endif %}
<span class="help-block">{{field.help_text}}</span>
<span class="help-block">{{ field.help_text }}</span>
<div class="input">
{{field}}
{{ field }}
</div>
</div>
{% endfor %}