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/repo
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
..
branch Allow unauthenticated users to compare (#11240) 5 years ago
diff Allow unauthenticated users to compare (#11240) 5 years ago
editor Add Octicon SVG spritemap (#10107) 5 years ago
issue Fix bug about comment attachment (#11272) 5 years ago
pulls Add missing commit states to PR checks template (#11085) 5 years ago
release Add single release page and latest redirect (#11102) 5 years ago
settings Remove last traces of has-emoji class (#11263) 5 years ago
wiki Remove last traces of has-emoji class (#11263) 5 years ago
activity.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
blame.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
branch_dropdown.tmpl Add Octicon SVG spritemap (#10107) 5 years ago
commit_page.tmpl Support unicode emojis and remove emojify.js (#11032) 5 years ago
commit_status.tmpl UI: Fix overflow issues in repo (#7190) 6 years ago
commits.tmpl Add Octicon SVG spritemap (#10107) 5 years ago
commits_list.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
commits_table.tmpl Add Octicon SVG spritemap (#10107) 5 years ago
create.tmpl Fix creation of Organization repos by Users with max created personal repos (#11183) 5 years ago
empty.tmpl Option to set default branch at repository creation (#10803) 5 years ago
forks.tmpl #3348 always use relative avatar link in the template 9 years ago
graph.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
header.tmpl Fix forked repo has no icon and language stat. (#10791) 5 years ago
home.tmpl Allow unauthenticated users to compare (#11240) 5 years ago
migrate.tmpl Improve migrations to support migrating milestones/labels/issues/comments/pullrequests (#6290) 6 years ago
migrating.tmpl [assets] configurable URL for static resources (#7911) 5 years ago
search.tmpl ui: fix status label on branches list vertical alignment (#11109) 5 years ago
sub_menu.tmpl Tweak language stats bar (#10487) 5 years ago
user_cards.tmpl Add Octicon SVG spritemap (#10107) 5 years ago
view_file.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
view_list.tmpl Remove last traces of has-emoji class (#11263) 5 years ago
watchers.tmpl #1692 APIs: Users Followers 9 years ago