Ejemplo n.º 1
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     volume = self.get_data()
     table = project_tables.VolumesTable(self.request)
     context["volume"] = volume
     context["url"] = self.get_redirect_url()
     context["actions"] = table.render_row_actions(volume)
     return context
Ejemplo n.º 2
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     volume = self.get_data()
     table = project_tables.VolumesTable(self.request)
     context["volume"] = volume
     context["url"] = self.get_redirect_url()
     context["actions"] = table.render_row_actions(volume)
     choices = project_tables.VolumesTableBase.STATUS_DISPLAY_CHOICES
     volume.status_label = filters.get_display_label(choices, volume.status)
     return context
Ejemplo n.º 3
0
    def get_context_data(self, **kwargs):
        context = super(DetailView, self).get_context_data(**kwargs)
        volume = self.get_data()
        table = project_tables.VolumesTable(self.request)
        context["volume"] = volume
        context["url"] = self.get_redirect_url()
        context["actions"] = table.render_row_actions(volume)
        context["page_title"] = _("Volume Details: "
                                  "%(volume_name)s") % {'volume_name':
                                                        volume.name}

        return context
Ejemplo n.º 4
0
 def get_context_data(self, **kwargs):
     context = super(DetailView, self).get_context_data(**kwargs)
     volume = self.get_data()
     table = project_tables.VolumesTable(self.request)
     context["volume"] = volume
     context["url"] = self.get_redirect_url()
     context["actions"] = table.render_row_actions(volume)
     status_label = [label for (value, label) in
                     project_tables.VolumesTableBase.STATUS_DISPLAY_CHOICES
                     if value.lower() == (volume.status or '').lower()]
     if status_label:
         volume.status_label = status_label[0]
     else:
         volume.status_label = volume.status
     return context