Esempio n. 1
0
    def get_display(self):
        # create the asset tab
        widget = DivWdg(css="spt_view_panel")
        self.set_as_panel(widget)
        search_wdg = self.get_search_wdg()
        widget.add(search_wdg)
        widget.add(HtmlElement.br())
        search = search_wdg.get_search()

        # the filter for searching assets
        #div = DivWdg(css="filter_box")
        #snap_filter = SnapshotFilterWdg()
        #div.add(snap_filter)
        #widget.add(div)

        table_id = "main_body_table"
        from tactic.ui.panel import TableLayoutWdg
        snap_table = TableLayoutWdg(table_id=table_id, search_type=Snapshot.SEARCH_TYPE, \
                view="log", inline_search=True)
        snap_table.alter_search(search)
        widget.add(snap_table)

        search.add_order_by("timestamp desc")
        sobjects = search.get_sobjects()
        #search.add_filter("login", Environment.get_login().get_login())
        #widget.set_search(search)
        snap_table.set_sobjects(sobjects, search)

        return widget
Esempio n. 2
0
    def get_display(self):
        # create the asset tab
        widget = DivWdg(css="spt_view_panel")
        self.set_as_panel(widget) 
        search_wdg = self.get_search_wdg()
        widget.add(search_wdg)
        widget.add(HtmlElement.br())
        search = search_wdg.get_search()

        
        # the filter for searching assets
        #div = DivWdg(css="filter_box")
        #snap_filter = SnapshotFilterWdg()
        #div.add(snap_filter)
        #widget.add(div)

        table_id = "main_body_table" 
        from tactic.ui.panel import TableLayoutWdg
        snap_table = TableLayoutWdg(table_id=table_id, search_type=Snapshot.SEARCH_TYPE, \
                view="log", inline_search=True)
        snap_table.alter_search(search)
        widget.add(snap_table)

        
        search.add_order_by("timestamp desc")
        sobjects = search.get_sobjects()
        #search.add_filter("login", Environment.get_login().get_login())
        #widget.set_search(search)
        snap_table.set_sobjects(sobjects, search)

        return widget
Esempio n. 3
0
    def get_display(my):

        widget = DivWdg()
        my.set_as_panel(widget, class_name='spt_view_panel spt_panel')

        # create a table widget and set the sobjects to it
        table_id = "main_body_table" 
        table = TableLayoutWdg(table_id=table_id, search_type="sthpw/notification_log", \
                view="table", inline_search=True, search_view='search') 

        search_type = "sthpw/notification_log"
        
        from tactic.ui.app import SearchWdg
        
        search_wdg = SearchWdg(search_type=search_type, view='search')

        
        widget.add(search_wdg)
        search = search_wdg.get_search()
        table.alter_search(search)
        sobjects = search.get_sobjects()
        table.set_sobjects(sobjects, search)
        widget.add(table)

        return widget
Esempio n. 4
0
    def get_display(my):
        widget = DivWdg()

        my.set_as_panel(widget, class_name='spt_view_panel spt_panel')
 
        # create a table widget and set the sobjects to it
        table_id = "main_body_table" 
        filter = my.kwargs.get('filter')
        table = TableLayoutWdg(table_id=table_id, search_type="sthpw/timecard", \
                view="table", inline_search=True, filter=filter, search_view='search' ) 

       
        search_type = "sthpw/timecard"
        from tactic.ui.app import SearchWdg
        
        search_wdg = SearchWdg(search_type=search_type, view='search', filter=filter)
        
        widget.add(search_wdg)
        search = search_wdg.get_search()

        # FIX to current project timecard for now
        search.add_filter('project_code', Project.get_project_code())
        #search.add_project_filter()

        table.alter_search(search)
        print "SEA ", search.get_statement()
        sobjects = search.get_sobjects()
        print "SOB ", sobjects
        table.set_sobjects(sobjects, search)
        widget.add(table)
        #widget.add(SpecialDayWdg())
        return widget
Esempio n. 5
0
    def get_display(self):
        widget = DivWdg(css="spt_view_panel")

        search_wdg = self.get_search_wdg()
        widget.add(search_wdg)
        widget.add(HtmlElement.br())
        search = search_wdg.get_search()

        type = self.kwargs.get('type')
        view = self.kwargs.get('view')
        if not view:
            view = 'table'

        table_id = "main_body_table"
        table = TableLayoutWdg(table_id=table_id, search_type=Submission.SEARCH_TYPE, \
                view=view, inline_search=True)
        table.alter_search(search)

        sobjs = search.get_sobjects(redo=True)
        table.set_sobjects(sobjs, search)

        widget.add(table)

        return widget
Esempio n. 6
0
  def get_display(self):
      widget = DivWdg(css="spt_view_panel")
 
      search_wdg = self.get_search_wdg()
      widget.add(search_wdg)
      widget.add(HtmlElement.br())
      search = search_wdg.get_search()
     
      type = self.kwargs.get('type')
      view = self.kwargs.get('view')
      if not view:
          view = 'table'
      
      table_id = "main_body_table" 
      table = TableLayoutWdg(table_id=table_id, search_type=Submission.SEARCH_TYPE, \
              view=view, inline_search=True)
      table.alter_search(search)
     
      sobjs = search.get_sobjects(redo=True)
      table.set_sobjects(sobjs, search)
  
      widget.add(table)
  
      return widget