def display(self, item_list, page, max_page, list_filter, buttons, time):
        Render.clear()
        Render.header(self.header)
        filter_info_list = []
        for filt in self.filters:
            if filt == list_filter:             
                filter_info_list += ["# "+filt.upper()+" #"]
            else:
                filter_info_list += [filt]
        Render.tool_bar(filter_info_list)

        item_info_list = []
        if list_filter == "working":
            self.list_header = Employee.get_working_header()
            for item in item_list:
                item_info_list += [LL_API.get_working_list_info(item, time).split("#")]
        else:
            self.list_header = Employee.get_header()
            for item in item_list:
                item_info_list += [LL_API.get_list_info(item).split("#")]

        Render.display_list(self.list_header, item_info_list)
        Render.page_bar(page, max_page)
        Render.tool_bar(buttons)
        Render.the_border()
 def display(self, item, buttons):
     Render.clear()
     Render.header(self.header)
     item_info = LL_API.get_info(item)
     Render.indent_info_window(item_info)
     Render.tool_bar(buttons)
     Render.the_border()
Ejemplo n.º 3
0
 def display(self, item):
     Render.clear()
     Render.header(self.header)
     item_info = LL_API.get_info(item)
     Render.the_info_window(item_info)
     if self.edit_window != None:
         Render.tool_bar(BUTTONS)
     Render.the_border()
Ejemplo n.º 4
0
 def display(self, edited_info, edit_index, buttons):
     Render.clear()
     Render.header(self.header)
     item_info = []
     for info in edited_info:
         item_info += [info[0:INDEX_OF_EDIT_PERMISSION_BOOL]]
     Render.the_info_window(item_info, True, edit_index)
     Render.tool_bar(buttons)
     Render.the_border()
Ejemplo n.º 5
0
 def display(self, string_page, page, max_page, buttons):
     Render.clear()
     Render.header(self.header)
     string_page_render_format = []
     for string_a in string_page:
         string_page_render_format += [[string_a]]
     Render.display_list([self.string_type], string_page_render_format)
     Render.page_bar(page, max_page)
     Render.tool_bar(buttons)
     Render.the_border()
Ejemplo n.º 6
0
 def display(self, item_page, page, max_page):
     Render.clear()
     Render.header(self.header)
     item_info_list = []
     for item in item_page:
         item_info_list += [LL_API.get_list_info(item).split("#")]
     Render.display_list(self.list_header, item_info_list)
     Render.page_bar(page, max_page)
     Render.tool_bar(BUTTONS)
     Render.the_border()
Ejemplo n.º 7
0
 def display(self, new_item_info, edit_index, buttons):
     Render.clear()
     Render.header(self.header)
     info_list = []
     for i in range(len(new_item_info)):
         if new_item_info[i] is None:
             info_list += [[self.info_names[i], "+"]]
         else:
             info_list += [[self.info_names[i], new_item_info[i]]]
     Render.the_info_window(info_list, True, edit_index)
     Render.tool_bar(buttons)
     Render.the_border()
Ejemplo n.º 8
0
    def display(self, item_list, page, max_page, list_filter, buttons, time):
        Render.clear()
        Render.header(self.header)
        Render.tool_bar(["Showing aircrafts for time:  " + str(time)])

        item_info_list = []
        for item in item_list:
            item_info_list += [LL_API.get_list_info(item).split("#")]
        Render.display_list(self.list_header, item_info_list)
        Render.page_bar(page, max_page)
        Render.tool_bar(buttons)
        Render.the_border()
Ejemplo n.º 9
0
    def display(self, new_item_info, edit_index, buttons):
        Render.clear()
        Render.header(self.header)
        info_list = []
        if new_item_info[0] is None:
            info_list += [[self.info_names[0], str(new_item_info[1])]]
        else:
            info_list += [[self.info_names[0], new_item_info[0].get_airport()]]

        info_list += [[self.info_names[1], str(new_item_info[1])]]
        Render.the_info_window(info_list, True, edit_index)
        Render.tool_bar(buttons)
        Render.the_border()
Ejemplo n.º 10
0
    def display(self, work_week):
        Render.clear()
        Render.header(self.header)

        ymir_format = []
        for item in work_week:
            ymir_format += [[str(item[0]).split()[0], str(item[1])]]

        self.__display_list(self.list_header, ymir_format)

        # Render.display_list(self.list_header, ymir_format)

        Render.the_border()
Ejemplo n.º 11
0
    def display(self, item_list, page, max_page, list_filter, buttons):
        Render.clear()
        Render.header(self.header)
        if self.filters != None:
            filter_info_list = []
            for filt in self.filters:
                if filt == list_filter:
                    filter_info_list += ["# " + filt.upper() + " #"]
                else:
                    filter_info_list += [filt]
            Render.tool_bar(filter_info_list)

        item_info_list = []
        for item in item_list:
            item_info_list += [LL_API.get_list_info(item).split("#")]
        Render.display_list(self.list_header, item_info_list)
        Render.page_bar(page, max_page)
        Render.tool_bar(buttons)
        Render.the_border()
Ejemplo n.º 12
0
    def display(self, edit_info, edit_index, buttons):
        Render.clear()
        Render.header(self.header)
        indent_display_info = []


        # formatting data for indent_info_function
        info_format_list = []
        size_of_list = 3 + len(edit_info[COPILOT_LIST_INDEX]) + len(edit_info[FLIGHT_ATTENDANT_LIST_INDEX])
        for i in range(size_of_list):
            item_selected, item_type_str = Voyage_Edit_Window.__get_edit_info_item_and_type(edit_info, i)
            if item_selected is None:
                info_format_list += [[item_type_str, "+"]]
            else:
                info_format_list += [[item_type_str, item_selected.get_name()]]

        # fixing arrow being on cabin crew or pilot header

        Render.the_info_window(info_format_list, edit=True, edit_index=edit_index)
        Render.tool_bar(buttons)
        Render.the_border()
Ejemplo n.º 13
0
 def display():
     Render.clear()
     Render.header("Main Menu", right="|Q| Quit")
     Render.menu([]+buttons)
     Render.the_border()
Ejemplo n.º 14
0
 def display():
     Render.clear()
     Render.header("Select Time")
     Render.the_border()
Ejemplo n.º 15
0
 def display(self):
     Render.header(self.header)
     Render.the_border()
Ejemplo n.º 16
0
 def display(error_message):
     Render.clear()
     Render.header("ERROR!")
     Render.error("Incorrect input")
     Render.the_border()