Mercurial > kallithea
comparison rhodecode/lib/helpers.py @ 3915:a42bfe8a9335 beta
moved make-index command to paster_commands module
- optimized imports and code
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 30 May 2013 00:01:16 +0200 |
parents | f7bf0cebe391 |
children | 14afe4d1363d |
comparison
equal
deleted
inserted
replaced
3914:424b6c711a7f | 3915:a42bfe8a9335 |
---|---|
898 # Create a link to the very last page (unless we are on the last | 898 # Create a link to the very last page (unless we are on the last |
899 # page or there would be no need to insert '..' spacers) | 899 # page or there would be no need to insert '..' spacers) |
900 if self.page != self.last_page and rightmost_page < self.last_page: | 900 if self.page != self.last_page and rightmost_page < self.last_page: |
901 nav_items.append(self._pagerlink(self.last_page, self.last_page)) | 901 nav_items.append(self._pagerlink(self.last_page, self.last_page)) |
902 | 902 |
903 ## prerender links | |
904 nav_items.append(literal('<link rel="prerender" href="/rhodecode/changelog/1?page=%s">' % str(int(self.page)+1))) | |
903 return self.separator.join(nav_items) | 905 return self.separator.join(nav_items) |
904 | 906 |
905 def pager(self, format='~2~', page_param='page', partial_param='partial', | 907 def pager(self, format='~2~', page_param='page', partial_param='partial', |
906 show_if_single_page=False, separator=' ', onclick=None, | 908 show_if_single_page=False, separator=' ', onclick=None, |
907 symbol_first='<<', symbol_last='>>', | 909 symbol_first='<<', symbol_last='>>', |
908 symbol_previous='<', symbol_next='>', | 910 symbol_previous='<', symbol_next='>', |
909 link_attr={'class': 'pager_link'}, | 911 link_attr={'class': 'pager_link', 'rel': 'prerender'}, |
910 curpage_attr={'class': 'pager_curpage'}, | 912 curpage_attr={'class': 'pager_curpage'}, |
911 dotdot_attr={'class': 'pager_dotdot'}, **kwargs): | 913 dotdot_attr={'class': 'pager_dotdot'}, **kwargs): |
912 | 914 |
913 self.curpage_attr = curpage_attr | 915 self.curpage_attr = curpage_attr |
914 self.separator = separator | 916 self.separator = separator |