Pass alternate column classes to the cabinet, index and tags document list views to improve the rendered size of the document panels.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -95,23 +95,24 @@ class CabinetDetailView(DocumentListView):
|
||||
return queryset
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
data = super(CabinetDetailView, self).get_context_data(**kwargs)
|
||||
context = super(CabinetDetailView, self).get_context_data(**kwargs)
|
||||
|
||||
cabinet = self.get_object()
|
||||
|
||||
data.update(
|
||||
context.update(
|
||||
{
|
||||
'column_class': 'col-xs-12 col-sm-6 col-md-4 col-lg-3',
|
||||
'hide_links': True,
|
||||
'jstree_data': '\n'.join(
|
||||
jstree_data(node=cabinet.get_root(), selected_node=cabinet)
|
||||
),
|
||||
'hide_links': True,
|
||||
'list_as_items': True,
|
||||
'object': cabinet,
|
||||
'title': _('Details of cabinet: %s') % cabinet.get_full_path(),
|
||||
}
|
||||
)
|
||||
|
||||
return data
|
||||
return context
|
||||
|
||||
def get_object(self):
|
||||
cabinet = get_object_or_404(Cabinet, pk=self.kwargs['pk'])
|
||||
|
||||
@@ -254,6 +254,7 @@ class IndexInstanceNodeView(DocumentListView):
|
||||
context = super(IndexInstanceNodeView, self).get_extra_context()
|
||||
context.update(
|
||||
{
|
||||
'column_class': 'col-xs-12 col-sm-6 col-md-4 col-lg-3',
|
||||
'object': self.index_instance_node,
|
||||
'navigation': mark_safe(
|
||||
_('Navigation: %s') % node_tree(
|
||||
|
||||
@@ -202,6 +202,7 @@ class TagTaggedItemListView(DocumentListView):
|
||||
context = super(TagTaggedItemListView, self).get_extra_context()
|
||||
context.update(
|
||||
{
|
||||
'column_class': 'col-xs-12 col-sm-6 col-md-4 col-lg-3',
|
||||
'object': self.get_tag(),
|
||||
'title': _('Documents with the tag: %s') % self.get_tag(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user