##// END OF EJS Templates
garden
marcink -
r1766:60790618 beta
parent child Browse files
Show More
@@ -19,11 +19,11 b' from webhelpers.html import literal, HTM'
19 from webhelpers.html.tools import *
19 from webhelpers.html.tools import *
20 from webhelpers.html.builder import make_tag
20 from webhelpers.html.builder import make_tag
21 from webhelpers.html.tags import auto_discovery_link, checkbox, css_classes, \
21 from webhelpers.html.tags import auto_discovery_link, checkbox, css_classes, \
22 end_form, file, form, hidden, image, javascript_link, link_to, link_to_if, \
22 end_form, file, form, hidden, image, javascript_link, link_to, \
23 link_to_unless, ol, required_legend, select, stylesheet_link, submit, text, \
23 link_to_if, link_to_unless, ol, required_legend, select, stylesheet_link, \
24 password, textarea, title, ul, xml_declaration, radio
24 submit, text, password, textarea, title, ul, xml_declaration, radio
25 from webhelpers.html.tools import auto_link, button_to, highlight, js_obfuscate, \
25 from webhelpers.html.tools import auto_link, button_to, highlight, \
26 mail_to, strip_links, strip_tags, tag_re
26 js_obfuscate, mail_to, strip_links, strip_tags, tag_re
27 from webhelpers.number import format_byte_size, format_bit_size
27 from webhelpers.number import format_byte_size, format_bit_size
28 from webhelpers.pylonslib import Flash as _Flash
28 from webhelpers.pylonslib import Flash as _Flash
29 from webhelpers.pylonslib.secure_form import secure_form
29 from webhelpers.pylonslib.secure_form import secure_form
@@ -105,10 +105,14 b' class _FilesBreadCrumbs(object):'
105 paths_l = paths.split('/')
105 paths_l = paths.split('/')
106 for cnt, p in enumerate(paths_l):
106 for cnt, p in enumerate(paths_l):
107 if p != '':
107 if p != '':
108 url_l.append(link_to(p, url('files_home',
108 url_l.append(link_to(p,
109 repo_name=repo_name,
109 url('files_home',
110 revision=rev,
110 repo_name=repo_name,
111 f_path='/'.join(paths_l[:cnt + 1]))))
111 revision=rev,
112 f_path='/'.join(paths_l[:cnt + 1])
113 )
114 )
115 )
112
116
113 return literal('/'.join(url_l))
117 return literal('/'.join(url_l))
114
118
@@ -292,7 +296,6 b' from rhodecode.model.db import User'
292 age = lambda x:_age(x)
296 age = lambda x:_age(x)
293 capitalize = lambda x: x.capitalize()
297 capitalize = lambda x: x.capitalize()
294 email = author_email
298 email = author_email
295 person = lambda x: author_name(x)
296 short_id = lambda x: x[:12]
299 short_id = lambda x: x[:12]
297 hide_credentials = lambda x: ''.join(credentials_filter(x))
300 hide_credentials = lambda x: ''.join(credentials_filter(x))
298
301
@@ -556,7 +559,8 b' class RepoPage(Page):'
556 self.items_per_page))
559 self.items_per_page))
557 self.last_page = self.first_page + self.page_count - 1
560 self.last_page = self.first_page + self.page_count - 1
558
561
559 # Make sure that the requested page number is the range of valid pages
562 # Make sure that the requested page number is the range of
563 # valid pages
560 if self.page > self.last_page:
564 if self.page > self.last_page:
561 self.page = self.last_page
565 self.page = self.last_page
562 elif self.page < self.first_page:
566 elif self.page < self.first_page:
@@ -698,7 +702,8 b' def fancy_file_stats(stats):'
698 def urlify_text(text):
702 def urlify_text(text):
699 import re
703 import re
700
704
701 url_pat = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)')
705 url_pat = re.compile(r'''(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'''
706 '''|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)''')
702
707
703 def url_func(match_obj):
708 def url_func(match_obj):
704 url_full = match_obj.groups()[0]
709 url_full = match_obj.groups()[0]
@@ -708,4 +713,5 b' def urlify_text(text):'
708
713
709
714
710 def rst(source):
715 def rst(source):
711 return literal('<div class="rst-block">%s</div>' % MarkupRenderer.rst(source))
716 return literal('<div class="rst-block">%s</div>' %
717 MarkupRenderer.rst(source))
General Comments 0
You need to be logged in to leave comments. Login now