Feat: New blog article page.
This commit is contained in:
@@ -189,6 +189,11 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
names_command: str
|
||||
hand_signal_default_descriptions_command: str
|
||||
notes_command: str
|
||||
get_all_user: bool
|
||||
get_inactive_user: bool
|
||||
ids_user: str
|
||||
names_user: str
|
||||
emails_user: str
|
||||
require_all_id_search_filters_met: bool
|
||||
require_any_id_search_filters_met: bool
|
||||
require_all_non_id_search_filters_met: bool
|
||||
@@ -197,7 +202,7 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
output_commands: bool
|
||||
|
||||
@classmethod
|
||||
def get_default(cls):
|
||||
def get_default(cls, id_user_session):
|
||||
return cls(
|
||||
get_all_command_category = True
|
||||
, get_inactive_command_category = False
|
||||
@@ -209,6 +214,11 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
, names_command = ''
|
||||
, hand_signal_default_descriptions_command = ''
|
||||
, notes_command = ''
|
||||
, get_all_user = False
|
||||
, get_inactive_user = False
|
||||
, ids_user = str(id_user_session)
|
||||
, names_user = ''
|
||||
, emails_user = ''
|
||||
, require_all_id_search_filters_met = True
|
||||
, require_any_id_search_filters_met = True
|
||||
, require_all_non_id_search_filters_met = False
|
||||
@@ -230,6 +240,11 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
, names_command = json.get('a_names_command', '')
|
||||
, hand_signal_default_descriptions_command = json.get('a_hand_signal_default_descriptions_command', '')
|
||||
, notes_command = json.get('a_notes_command', '')
|
||||
, get_all_user = json.get('a_get_all_user', False)
|
||||
, get_inactive_user = json.get('a_get_inactive_user', False)
|
||||
, ids_user = json.get('a_ids_user', '')
|
||||
, names_user = json.get('a_names_user', '')
|
||||
, emails_user = json.get('a_emails_user', '')
|
||||
, require_all_id_search_filters_met = json.get('a_require_all_id_search_filters_met', True)
|
||||
, require_any_id_search_filters_met = json.get('a_require_any_id_search_filters_met', True)
|
||||
, require_all_non_id_search_filters_met = json.get('a_require_all_non_id_search_filters_met', False)
|
||||
@@ -239,12 +254,12 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_command(cls, form):
|
||||
def from_form_filters_command(cls, form, id_user_session):
|
||||
av.val_instance(form, 'form', 'Parameters_Command.from_form_filters_command', Filters_Command)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
has_filter_command_category = not (has_filter_search_text or form.id_command_category.data == '0' or form.id_command_category.data == '' or form.id_command_category.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", "Parameters_Command.from_form_filters_command")
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_command_category = not has_filter_command_category
|
||||
filters.get_inactive_command_category = not active_only
|
||||
filters.ids_command_category = form.id_command_category.data if has_filter_command_category else ''
|
||||
@@ -256,11 +271,11 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
return filters
|
||||
|
||||
@classmethod
|
||||
def from_form_filters_command_category(cls, form):
|
||||
def from_form_filters_command_category(cls, form, id_user_session):
|
||||
av.val_instance(form, 'form', 'Parameters_Command.from_form_filters_command_category', Filters_Command_Category)
|
||||
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
|
||||
active_only = av.input_bool(form.active_only.data, "active", "Parameters_Command.from_form_filters_command")
|
||||
filters = cls.get_default()
|
||||
filters = cls.get_default(id_user_session)
|
||||
filters.get_all_command_category = True
|
||||
filters.get_inactive_command_category = not active_only
|
||||
filters.ids_command_category = ''
|
||||
@@ -285,6 +300,11 @@ class Parameters_Command(Get_Many_Parameters_Base):
|
||||
, 'a_names_command': self.names_command
|
||||
, 'a_hand_signal_default_descriptions_command': self.hand_signal_default_descriptions_command
|
||||
, 'a_notes_command': self.notes_command
|
||||
, 'a_get_all_user': self.get_all_user
|
||||
, 'a_get_inactive_user': self.get_inactive_user
|
||||
, 'a_ids_user': self.ids_user
|
||||
, 'a_names_user': self.names_user
|
||||
, 'a_emails_user': self.emails_user
|
||||
, 'a_require_all_id_search_filters_met': self.require_all_id_search_filters_met
|
||||
, 'a_require_any_id_search_filters_met': self.require_any_id_search_filters_met
|
||||
, 'a_require_all_non_id_search_filters_met': self.require_all_non_id_search_filters_met
|
||||
|
||||
Reference in New Issue
Block a user