~ubuntu-branches/ubuntu/utopic/horizon/utopic-updates

« back to all changes in this revision

Viewing changes to openstack_dashboard/dashboards/project/images/images/tables.py

  • Committer: Package Import Robot
  • Author(s): James Page, Chris Johnston, James Page
  • Date: 2014-10-03 17:54:18 UTC
  • mfrom: (0.4.1) (1.1.44) (70.1.2 utopic)
  • Revision ID: package-import@ubuntu.com-20141003175418-1jomx0azdvnl5fxz
Tags: 1:2014.2~rc1-0ubuntu1
[ Chris Johnston ]
* d/theme/css/ubuntu.css: Fix Ubuntu theme for Instances "more" dropdown
  (LP: #1308651).

[ James Page ]
* New upstream release candidate:
  - d/p/*: Refresh.
* d/watch: Use tarballs.openstack.org for upstream releases. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from django.template import defaultfilters as filters
20
20
from django.utils.http import urlencode
21
21
from django.utils.translation import ugettext_lazy as _
 
22
from django.utils.translation import ungettext_lazy
22
23
 
23
24
from horizon import tables
24
25
from horizon.utils.memoized import memoized  # noqa
56
57
 
57
58
 
58
59
class DeleteImage(tables.DeleteAction):
59
 
    data_type_singular = _("Image")
60
 
    data_type_plural = _("Images")
 
60
    @staticmethod
 
61
    def action_present(count):
 
62
        return ungettext_lazy(
 
63
            u"Delete Image",
 
64
            u"Delete Images",
 
65
            count
 
66
        )
 
67
 
 
68
    @staticmethod
 
69
    def action_past(count):
 
70
        return ungettext_lazy(
 
71
            u"Deleted Image",
 
72
            u"Deleted Images",
 
73
            count
 
74
        )
 
75
 
61
76
    policy_rules = (("image", "delete_image"),)
62
77
 
63
78
    def allowed(self, request, image=None):