Changeset e656f76 in tailbone


Ignore:
Timestamp:
07/23/2022 10:18:17 PM (6 months ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
25f39f4
Parents:
28238c6
Message:

Allow optional row grid title for master view

Location:
tailbone
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tailbone/templates/master/view.mako

    r28238c6 re656f76  
    105105      % if use_buefy:
    106106          <br />
     107          % if rows_title:
     108              <h4 class="block is-size-4">${rows_title}</h4>
     109          % endif
    107110          <tailbone-grid ref="rowGrid" id="rowGrid"></tailbone-grid>
    108111      % else:
  • tailbone/views/master.py

    r28238c6 re656f76  
    167167    has_rows = False
    168168    model_row_class = None
     169    rows_title = None
    169170    rows_pageable = True
    170171    rows_sortable = True
     
    224225        """
    225226        return getattr(cls, 'grid_factory', grids.Grid)
     227
     228    @classmethod
     229    def get_rows_title(cls):
     230        # nb. we do not provide a default value for this, since it
     231        # will not always make sense to show a row title
     232        return cls.rows_title
    226233
    227234    @classmethod
     
    22092216
    22102217        if self.has_rows:
     2218            context['rows_title'] = self.get_rows_title()
    22112219            context['row_permission_prefix'] = self.get_row_permission_prefix()
    22122220            context['row_model_title'] = self.get_row_model_title()
Note: See TracChangeset for help on using the changeset viewer.