Skip to content

Commit 5df2526

Browse files
author
root
committed
Add feature #410
1 parent 5357095 commit 5df2526

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Diff for: app/views/repository_protected_branches/index.html.haml

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
- if @repository_protected_branches.any?
99

10-
%table{ class: 'table table-hover', id: 'protected_branches', data: { 'update-url' => sort_repository_protected_branches_url } }
10+
%table{ class: 'table table-hover',
11+
id: 'protected_branches',
12+
data: { 'update-url' => sort_repository_protected_branches_url },
13+
style: "opacity: #{@repository.protected_branches_enabled? ? '1' : '0.5'};" }
1114
%thead
1215
%tr
1316
%th
@@ -39,6 +42,9 @@
3942
= link_to l(:button_clone), clone_repository_protected_branch_path(@repository, protected_branch), class: 'icon icon-clone modal-box'
4043
= link_to l(:button_delete), repository_protected_branch_path(@repository, protected_branch), remote: true, method: :delete, confirm: l(:text_are_you_sure), class: 'icon icon-del'
4144

45+
- if [email protected]_branches_enabled?
46+
%em= l(:protected_branches_reminder)
47+
4248
- else
4349
%p{ class: 'nodata' }= l(:label_no_data)
4450

Diff for: config/locales/models/repository_protected_branche/en.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ en:
1717

1818
label_branch_path: Branch path
1919
label_user_list: Users allowed
20+
21+
protected_branches_reminder: The protected branches above are not enabled. Please enable Protected Branches in the repository settings above.

Diff for: config/locales/models/repository_protected_branche/fr.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ fr:
1717

1818
label_branch_path: Chemin de la branche
1919
label_user_list: Liste des utilisateurs autorisés
20+
21+
protected_branches_reminder: Les branches protégées ci-dessus ne sont pas actives. Pour les activer veuillez d'abord cocher la case "Activer les branches protégées" dans les paramètres du dépôt ci-dessus.

0 commit comments

Comments
 (0)