예제 #1
0
 def render_viewSelector(self, context, data):
     args = inevow.IRequest(context).args
     view = args.get('view', ['view'])[0]
     if view == 'view':
         selector = "View | ", tags.a(href=here.add('view','edit'))[ "Edit" ]
         editor = ''
     else:
         selector = tags.a(href=here.add('view','view'))["View"], " | Edit"
         editor = context.onePattern('edit')() # get one copy of the edit pattern
     viewer = context.onePattern('view')() # get one copy of the view pattern
     return selector, viewer, editor
예제 #2
0
파일: db.py 프로젝트: StetHD/nevow
 def render_viewSelector(self, context, data):
     args = inevow.IRequest(context).args
     view = args.get('view', ['view'])[0]
     if view == 'view':
         selector = "View | ", tags.a(href=here.add('view','edit'))[ "Edit" ]
         editor = ''
     else:
         selector = tags.a(href=here.add('view','view'))["View"], " | Edit"
         editor = context.onePattern('edit')() # get one copy of the edit pattern
     viewer = context.onePattern('view')() # get one copy of the view pattern
     return selector, viewer, editor
예제 #3
0
파일: db.py 프로젝트: perkinslr/nevow-py3
 def render_viewSelector(self, context, data):
     args = inevow.IRequest(context).args
     view = args.get("view", ["view"])[0]
     if view == "view":
         selector = "View | ", tags.a(href=here.add("view", "edit"))["Edit"]
         editor = ""
     else:
         selector = tags.a(href=here.add("view", "view"))["View"], " | Edit"
         editor = context.onePattern("edit")()  # get one copy of the edit pattern
     viewer = context.onePattern("view")()  # get one copy of the view pattern
     return selector, viewer, editor
예제 #4
0
파일: prefs.py 프로젝트: xregist/shtoom
    def genheaders():
        for i, head in enumerate(headers):
            badge, description = head
            if currentView == description:
                klas = 'tab-selected'
            else:
                klas = 'tab'

            yield T.a(href=here.add('currentView', description))[
                T.span(_class="%s" % klas)[
                    T.img(src="/images/%s.png" % badge, style="margin-right: 5px;"), description]]