Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 1 | # Copyright 2016 The Chromium Authors |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 4 | |
| 5 | """A class to render a page of issue tracker search tips.""" |
| 6 | from __future__ import print_function |
| 7 | from __future__ import division |
| 8 | from __future__ import absolute_import |
| 9 | |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 10 | from framework import permissions |
Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 11 | from framework import servlet |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 12 | |
| 13 | |
| 14 | class IssueSearchTips(servlet.Servlet): |
| 15 | """IssueSearchTips on-line help on how to use issue search.""" |
| 16 | |
| 17 | _PAGE_TEMPLATE = 'tracker/issue-search-tips.ezt' |
Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 18 | _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 19 | |
| 20 | def GatherPageData(self, mr): |
| 21 | """Build up a dictionary of data values to use when rendering the page.""" |
| 22 | |
| 23 | return { |
| 24 | 'issue_tab_mode': 'issueSearchTips', |
| 25 | 'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE), |
| 26 | } |
Adrià Vilanova Martínez | de94280 | 2022-07-15 14:06:55 +0200 | [diff] [blame] | 27 | |
Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 28 | def GetIssueSearchTips(self, **kwargs): |
| 29 | return self.handler(**kwargs) |