(refs #1479)Url encode the branch name

This commit is contained in:
Naoki Takezoe
2017-03-13 13:00:54 +09:00
parent 0401488ab1
commit 7b8a5a482a
3 changed files with 25 additions and 41 deletions

View File

@@ -46,14 +46,12 @@
</form>
</p>
<table class="table table-bordered table-hover branches">
<table class="table table-hover branches">
@protectedBranchList.map { branch =>
<tr>
<td>
<span class="branch-name">@branch</span>
<span class="branch-action">
<a href="@helpers.url(repository)/settings/branches/@helpers.encodeRefName(branch)" class="btn btn-small btn-default">Edit</a>
</span>
<a href="@helpers.url(repository)/settings/branches/@helpers.urlEncode(branch)" class="btn btn-sm btn-default pull-right">Edit</a>
</td>
</tr>
}
@@ -64,4 +62,4 @@
}
}
}
}
}

View File

@@ -33,30 +33,30 @@
Sorry, we couldnt find any status checks in the last week for this repository.<br />
Please create a commit status by API (<a href="https://developer.github.com/v3/repos/statuses/">Learn more about status checks on GitHub</a>)
</div>
}else{
<div class="js-has_required_statuses" style="display:none">
<div class="panel panel-default">
<div class="panel-heading">Choose which status checks must pass before branches can be merged into <b>@branch</b>.</div>
<div class="panel-body">
@knownContexts.map { context =>
<div class="checkbox">
<label>
<input type="checkbox" name="contexts" value="@context" onclick="update()" @check(protection.status.contexts.find(_ == context))>
<span>@context</span>
</label>
</div>
}
} else {
<div class="js-has_required_statuses" style="display:none">
<div class="panel panel-default">
<div class="panel-heading">Choose which status checks must pass before branches can be merged into <b>@branch</b>.</div>
<div class="panel-body">
@knownContexts.map { context =>
<div class="checkbox">
<label>
<input type="checkbox" name="contexts" value="@context" onclick="update()" @check(protection.status.contexts.find(_ == context))>
<span>@context</span>
</label>
</div>
}
</div>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="enforce_for_admins" onclick="update()" @check(protection.status.enforcement_level.name=="everyone")>
<span class="strong">Include administrators</span>
</label>
<p class="help-block">Enforce required status checks for repository administrators.</p>
</div>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="enforce_for_admins" onclick="update()" @check(protection.status.enforcement_level.name=="everyone")>
<span class="strong">Include administrators</span>
</label>
<p class="help-block">Enforce required status checks for repository administrators.</p>
</div>
</div>
}
</div>
<input class="btn btn-success js-submit-btn" type="submit" value="Save changes" />

View File

@@ -469,20 +469,6 @@ table.branches>thead>tr>th, table.branches>tbody>tr>td{
color: #aaa;
line-height: 20px;
}
.branches .branch-action{
/*float: right;*/
text-align: right;
height: 20px;
}
.branches .branch-action a {
font-size: 100%;
}
.branches .branch-action a.btn {
font-size: 100%;
position: relative;
top: -6px;
}
.branches .branch-a-b-count{
color: rgba(0,0,0,0.5);
}