Exemplo n.º 1
0
 def _get_report_context_tile_detail():
     from corehq.apps.app_manager.suite_xml.features.mobile_ucr import MOBILE_UCR_TILE_DETAIL_ID
     return Detail(
         id=MOBILE_UCR_TILE_DETAIL_ID,
         title=Text(),
         fields=[
             Field(
                 style=Style(
                     horz_align="left",
                     font_size="small",
                     grid_height=1,
                     grid_width=12,
                     grid_x=0,
                     grid_y=0,
                 ),
                 header=Header(text=Text()),
                 template=Template(text=Text(xpath=Xpath(
                     function=
                     "concat($message, ' ', format-date(date(instance('commcare-reports:index')/report_index/reports/@last_update), '%e/%n/%Y'))",
                     variables=[
                         XpathVariable(
                             name='message',
                             locale_id=id_strings.reports_last_updated_on())
                     ],
                 ))),
             )
         ])
Exemplo n.º 2
0
 def _get_persistent_case_context_detail(module, xml):
     return Detail(id=id_strings.persistent_case_context_detail(module),
                   title=Text(),
                   fields=[
                       Field(
                           style=Style(
                               horz_align="center",
                               font_size="large",
                               grid_height=1,
                               grid_width=12,
                               grid_x=0,
                               grid_y=0,
                           ),
                           header=Header(text=Text()),
                           template=Template(text=Text(xpath_function=xml)),
                       )
                   ])