def _get_case_search_action(module): action = Action(display=Display(text=Text( locale_id=id_strings.case_search_locale(module))), stack=Stack()) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module): action = Action( display=Display( text=Text(locale_id=id_strings.case_search_locale(module)) ), stack=Stack() ) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module): relevant_kwarg = {} if module.search_config.search_button_display_condition: relevant_kwarg = dict(relevant=XPath( module.search_config.search_button_display_condition), ) action = Action(display=Display(text=Text( locale_id=id_strings.case_search_locale(module))), stack=Stack(), **relevant_kwarg) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module, in_search=False): action_kwargs = DetailContributor._get_action_kwargs(module, in_search) action = Action( display=Display(text=Text(locale_id=( id_strings.case_search_again_locale(module) if in_search else id_strings.case_search_locale(module)))), stack=Stack(), auto_launch=DetailContributor._get_auto_launch_expression( module, in_search), redo_last=in_search, **action_kwargs) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module): relevant_kwarg = {} if module.search_config.search_button_display_condition: relevant_kwarg = dict( relevant=XPath(module.search_config.search_button_display_condition), ) action = Action( display=Display( text=Text(locale_id=id_strings.case_search_locale(module)) ), stack=Stack(), **relevant_kwarg ) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module): relevant_kwarg = {} if module.search_config.search_button_display_condition: relevant_kwarg = dict(relevant=XPath( module.search_config.search_button_display_condition), ) allow_auto_launch = toggles.CASE_CLAIM_AUTOLAUNCH.enabled( module.get_app().domain) action = Action(display=Display(text=Text( locale_id=id_strings.case_search_locale(module))), stack=Stack(), auto_launch=allow_auto_launch and module.search_config.auto_launch, **relevant_kwarg) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(module, in_search=False): relevant_kwarg = {} if not in_search and module.search_config.search_button_display_condition: relevant_kwarg = dict(relevant=XPath( module.search_config.search_button_display_condition), ) allow_auto_launch = toggles.USH_CASE_CLAIM_UPDATES.enabled( module.get_app().domain) and not in_search action = Action(display=Display(text=Text( locale_id=(id_strings.case_search_again_locale(module) if in_search else id_strings.case_search_locale(module)))), stack=Stack(), auto_launch=allow_auto_launch and module.search_config.auto_launch, redo_last=in_search, **relevant_kwarg) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action
def _get_case_search_action(self, module, in_search=False): action_kwargs = DetailContributor._get_action_kwargs(module, in_search) if in_search: search_label = module.search_config.search_again_label else: search_label = module.search_config.search_label if self.app.enable_localized_menu_media: action = LocalizedAction( menu_locale_id=(id_strings.case_search_again_locale(module) if in_search else id_strings.case_search_locale(module)), media_image=search_label.uses_image( build_profile_id=self.build_profile_id), media_audio=search_label.uses_audio( build_profile_id=self.build_profile_id), image_locale_id=( id_strings.case_search_again_icon_locale(module) if in_search else id_strings.case_search_icon_locale(module)), audio_locale_id=( id_strings.case_search_again_audio_locale(module) if in_search else id_strings.case_search_audio_locale(module)), stack=Stack(), for_action_menu=True, **action_kwargs, ) else: action = Action(display=Display( text=Text(locale_id=( id_strings.case_search_again_locale(module) if in_search else id_strings.case_search_locale(module))), media_image=search_label.default_media_image, media_audio=search_label.default_media_audio), stack=Stack(), **action_kwargs) frame = PushFrame() frame.add_mark() frame.add_command(XPath.string(id_strings.search_command(module))) action.stack.add_frame(frame) return action