mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 14:08:01 +02:00
Remove unit types commits and settings (#2161)
* Remove unit types commits and settings * Can not limit units in administrator teams * Limit changing units only to teams with read and write access mode * Small code optimization
This commit is contained in:
@ -1202,6 +1202,9 @@ footer .ui.language .menu {
|
||||
margin-top: -1px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.repository .tabs .navbar {
|
||||
justify-content: initial;
|
||||
}
|
||||
.repository .navbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -657,6 +657,18 @@ function initRepositoryCollaboration() {
|
||||
});
|
||||
}
|
||||
|
||||
function initTeamSettings() {
|
||||
// Change team access mode
|
||||
$('.organization.new.team input[name=permission]').change(function () {
|
||||
var val = $('input[name=permission]:checked', '.organization.new.team').val()
|
||||
if (val === 'admin') {
|
||||
$('.organization.new.team .team-units').hide();
|
||||
} else {
|
||||
$('.organization.new.team .team-units').show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initWikiForm() {
|
||||
var $editArea = $('.repository.wiki textarea#edit_area');
|
||||
if ($editArea.length > 0) {
|
||||
@ -1557,6 +1569,7 @@ $(document).ready(function () {
|
||||
initAdmin();
|
||||
initCodeView();
|
||||
initDashboardSearch();
|
||||
initTeamSettings();
|
||||
|
||||
// Repo clone url.
|
||||
if ($('#repo-clone-url').length > 0) {
|
||||
|
@ -36,6 +36,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tabs {
|
||||
.navbar {
|
||||
justify-content: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
Reference in New Issue
Block a user