You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/templates
Kyle Evans 38cd9ba47b
Allow unauthenticated users to compare (#11240)
* routers: make /compare route available to unauthenticated users

Remove some bits of the compare interface if the user isn't signed in.
Notably, they don't need to see the "New Pull Request" button box nor the
hidden form that would fail to submit due to the POST request continuing to
require proper privileges.

Follow-up commits will improve the UI a bit around this, removing some
"Pull Request" verbiage in favor of "Compare."

* ui: home: show "compare" button for unauthenticated users

This change requires pulling in the BaseRepo unconditionally and
recording if the pull request is in-fact not allowed
(.PullRequestCtx.Allowed). If the user isn't allowed to create a pull
request, either because this isn't a fork or same-fork branch PRs aren't
allowed, then we'll name the button "Compare" instead of "Pull Request."

* ui: branch list: use the new Compare language when available

When viewing the branch listing as an unauthenticated user, you'll get
"Pull Request" buttons. use the new "Compare" verbiage instead, which
matches GitHub behavior when you can't issue a pull request from the
branches.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
5 years ago
..
admin Sendmail should create a process on the gitea system and have a default timeout (#11256) 5 years ago
base Support unicode emojis and remove emojify.js (#11032) 5 years ago
custom Add footer extra links template (#9576) 5 years ago
explore Remove last traces of has-emoji class (#11263) 5 years ago
mail Style blockquote for default issue mail template (#10024) 5 years ago
org Add Organization Wide Labels (#10814) 5 years ago
pwa Support unicode emojis and remove emojify.js (#11032) 5 years ago
repo Allow unauthenticated users to compare (#11240) 5 years ago
status Make error pages translatable (#11163) 5 years ago
swagger API: Add pull review endpoints (#11224) 5 years ago
user Remove last traces of has-emoji class (#11263) 5 years ago
home.tmpl Add Octicon SVG spritemap (#10107) 5 years ago
install.tmpl Change default charset for MySQL on install to utf8mb4 (#10989) 5 years ago