def _milestone_input(self):
        milestones = [{"id": None, "name": "None"}] + data.list_of_milestones(self.project)
        items = tuple((m.get("name", ""), m.get("id", None)) for m in milestones)
        selected = self.user_story.get("milestone", None)

        self._milestone_combo = generic.ComboBox(items, selected_value=selected, style="cyan")

        colum_items = [(17, urwid.Padding(generic.ListText("Milestone", align="right"), right=4))]
        colum_items.append(self._milestone_combo)
        return urwid.Columns(colum_items)
    def _milestone_selector(self):
        contents = []
        for milestone in data.list_of_milestones(self.project):
            option = MilestoneOptionEntry(milestone)
            self.options.append(option)

            contents.append(option)
            contents.append(generic.box_solid_fill(" ", 1))

        list_walker = urwid.SimpleFocusListWalker(contents)
        if len(contents) > 0:
            list_walker.set_focus(0)
        return urwid.BoxAdapter(urwid.ListBox(list_walker), 20)
Beispiel #3
0
    def _milestone_selector(self):
        contents = []
        for milestone in data.list_of_milestones(self.project):
            option = MilestoneOptionEntry(milestone)
            self.options.append(option)

            contents.append(option)
            contents.append(generic.box_solid_fill(" ", 1))

        list_walker = urwid.SimpleFocusListWalker(contents)
        if len(contents) > 0:
            list_walker.set_focus(0)
        return urwid.BoxAdapter(urwid.ListBox(list_walker), 20)
Beispiel #4
0
    def _milestone_input(self):
        milestones = [{
            "id": None,
            "name": "None"
        }] + data.list_of_milestones(self.project)
        items = tuple(
            (m.get("name", ""), m.get("id", None)) for m in milestones)
        selected = self.user_story.get("milestone", None)

        self._milestone_combo = generic.ComboBox(items,
                                                 selected_value=selected,
                                                 style="cyan")

        colum_items = [(17,
                        urwid.Padding(generic.ListText("Milestone",
                                                       align="right"),
                                      right=4))]
        colum_items.append(self._milestone_combo)
        return urwid.Columns(colum_items)