示例#1
0
文件: login.py 项目: rudykocur/pyeve
    def renderRegisterForm(self, form):
        html = HtmlLayout(isLogged=False)

        formView = FormRenderer()
        formView.addButton('Create account')
        formView.setRenderPanel()

        content = (
            T.div(class_="row")[
                T.div(class_="col-sm-4")[
                    T.h2['Register form'],
                ],
                T.div(class_="col-sm-4 text-right")[
                    T.h2[T.a(href=self.getUrl('index'))['Back']]
                ]
            ],

            T.div(class_="row")[
                T.div(class_="col-sm-8")[
                    formView.render(form)
                ]
            ]
        )

        html.setContent(content)

        return html
示例#2
0
文件: login.py 项目: rudykocur/pyeve
    def renderLoginForm(self, form, count):

        formView = FormRenderer()
        formView.addButton('Login')
        formView.setRenderPanel()

        content = [
            T.div(class_="row")[
                T.div(class_="col-sm-4")[
                    T.h2['Login form '],
                ],
                T.div(class_="col-sm-4 text-right")[
                    T.h2[T.a(href=self.getUrl('register'))['Register account']]
                ]
            ],

            T.div(class_="row")[
                T.div(class_="col-sm-8")[
                    formView.render(form)
                ]
            ],

        ]

        layout = HtmlLayout(isLogged=False)
        layout.setContent(content)
        return layout
示例#3
0
    def renderForm(self, form):
        html = HtmlLayout()

        formView = FormRenderer()
        formView.addButton('Add key')

        html.setContent(['new key form...', formView.render(form)])

        return html
示例#4
0
    def renderApiKeys(self, keys):
        content = (
            T.h2['API Keys'],

            T.p[
                T.a(href=self.getUrl('profile/newKey'))[
                    T.button(class_='btn btn-primary')['Add key']
                ],
            ],

            T.div(class_='panel panel-default')[
                T.div(class_='panel-heading')['Added keys'],

                T.table(class_='table')[
                    T.thead[
                        T.tr[
                            T.th['Key ID'],
                            T.th['Expires'],
                            T.th['Characters'],
                            T.th()
                        ]
                    ],
                    T.tbody[
                        forEach(keys, lambda keyId, expires, characters: (
                            T.tr[
                                T.td[keyId],
                                T.td[expires],
                                T.td[
                                    [
                                        T.div[char]
                                        for char in characters
                                    ]
                                ],
                                T.td[
                                    T.a(class_='glyphicon glyphicon-info-sign withTooltip', title='Detailed info',
                                        href='#',
                                        **{'data-placement': 'top', 'data-toggle': 'tooltip'}),
                                    ' ',
                                    T.a(class_='glyphicon glyphicon-trash withTooltip text-danger', title='Delete key',
                                        href='#',
                                        **{'data-placement': 'top', 'data-toggle': 'tooltip'}),
                                ]
                            ]
                        )),
                    ]
                ]
            ]
        )

        html = HtmlLayout()
        html.setContent(content)
        return html
示例#5
0
 def renderProfile(self):
     html = HtmlLayout()
     html.setContent(T.h2['LOLOLOL LAYOUT'])
     return html
示例#6
0
文件: skills.py 项目: rudykocur/pyeve
    def doGet(self, request):
        layout = HtmlLayout()
        layout.setContent('Skills plans')

        return layout
示例#7
0
文件: skills.py 项目: rudykocur/pyeve
    def doGet(self, request):
        layout = HtmlLayout()
        layout.setContent('Skills list, etc')

        return layout