0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-02 22:37:36 +01:00
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>
2020-05-04 19:44:30 -03:00
..
branch Allow unauthenticated users to compare (#11240) 2020-05-04 19:44:30 -03:00
diff Allow unauthenticated users to compare (#11240) 2020-05-04 19:44:30 -03:00
editor
issue Fix bug about comment attachment (#11272) 2020-05-02 15:03:47 +01:00
pulls Add missing commit states to PR checks template (#11085) 2020-04-16 14:08:20 -05:00
release Add single release page and latest redirect (#11102) 2020-04-18 11:47:15 -03:00
settings Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
wiki Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
activity.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
blame.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
branch_dropdown.tmpl
commit_page.tmpl Support unicode emojis and remove emojify.js (#11032) 2020-04-28 15:05:39 -03:00
commit_status.tmpl
commits_list.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
commits_table.tmpl
commits.tmpl
create.tmpl Fix creation of Organization repos by Users with max created personal repos (#11183) 2020-04-30 16:11:56 +01:00
empty.tmpl
forks.tmpl
graph.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
header.tmpl
home.tmpl Allow unauthenticated users to compare (#11240) 2020-05-04 19:44:30 -03:00
migrate.tmpl
migrating.tmpl
search.tmpl ui: fix status label on branches list vertical alignment (#11109) 2020-04-17 12:35:12 -04:00
sub_menu.tmpl
user_cards.tmpl
view_file.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
view_list.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
watchers.tmpl