|
42 | 42 | <% end %>
|
43 | 43 | </p>
|
44 | 44 |
|
45 |
| - <% if @project.repository.nil? %> |
46 |
| - <p> |
47 |
| - <%= hidden_field_tag "repository[is_default]", "0" %> |
48 |
| - <label><%= l(:field_repository_is_default) %></label> |
49 |
| - <span class="bootstrap-switch switch-small" data-on="primary" data-off="default" data-on-label="<%= l(:label_yes) %>" data-off-label="<%= l(:label_no) %>"> |
50 |
| - <%= check_box_tag "repository[is_default]", @repository.is_default, @repository.is_default, disabled: !@repository.new_record? %> |
51 |
| - </span> |
52 |
| - </p> |
53 |
| - <% elsif @project.repository == @repository %> |
54 |
| - <p> |
55 |
| - <%= hidden_field_tag "repository[is_default]", "1" %> |
56 |
| - <label><%= l(:field_repository_is_default) %></label> |
57 |
| - <span class="label label-success"><%= l(:label_yes) %></span> |
58 |
| - </p> |
59 |
| - <% else %> |
60 |
| - <%= hidden_field_tag "repository[is_default]", "0" %> |
61 |
| - <% end %> |
| 45 | + <p><%= f.check_box :is_default, :label => :field_repository_is_default %></p> |
62 | 46 |
|
63 | 47 | <% if @repository && @repository.is_a?(Repository::Git) %>
|
64 | 48 | <% if @repository.new_record? %>
|
|
78 | 62 | <p><%= f.text_field :identifier %></p>
|
79 | 63 | <% end %>
|
80 | 64 |
|
81 |
| - <% if @repository && @repository.is_a?(Repository::Git) && !@repository.new_record? %> |
82 |
| - <p> |
83 |
| - <label><%= l(:label_browse_repository) %></label> |
84 |
| - <%= link_to h(@repository.url), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => @repository.identifier_param} %> |
85 |
| - </p> |
86 |
| - |
87 |
| - <p> |
88 |
| - <%= label_tag "", l(:label_repository_exists_in_gitolite) %> |
89 |
| - <%= image_tag (@repository.exists_in_gitolite? ? 'true.png' : 'exclamation.png') %> |
90 |
| - </p> |
91 |
| - <% end %> |
92 |
| - |
93 | 65 | <%= content_tag('p', f.select(
|
94 | 66 | :path_encoding, [nil] + Setting::ENCODINGS,
|
95 | 67 | :label => l(:field_scm_path_encoding)
|
|
121 | 93 |
|
122 | 94 | <p>
|
123 | 95 | <label><%= l(:label_enable_git_daemon) %></label>
|
124 |
| - <span class="bootstrap-switch switch-small" data-on="primary" data-off="default" data-on-label="<%= l(:label_yes) %>" data-off-label="<%= l(:label_no) %>"> |
125 |
| - <%= hidden_field_tag "extra[git_daemon]", "false" %> |
126 |
| - <%= check_box_tag "extra[git_daemon]", selected, (selected == "true" ? true : false), disabled: !@project.is_public %> |
127 |
| - </span> |
| 96 | + <%= hidden_field_tag "extra[git_daemon]", "false" %> |
| 97 | + <%= check_box_tag "extra[git_daemon]", selected, (selected == "true" ? true : false), disabled: !@project.is_public %> |
128 | 98 | </p>
|
129 | 99 |
|
130 | 100 | <% if user_allowed_to(:create_repository_git_notifications, @repository.project) %>
|
131 | 101 | <p>
|
132 | 102 | <label><%= l(:label_enable_git_notify) %></label>
|
133 |
| - <span class="bootstrap-switch switch-small" data-on="primary" data-off="default" data-on-label="<%= l(:label_yes) %>" data-off-label="<%= l(:label_no) %>"> |
134 |
| - <%= hidden_field_tag "extra[git_notify]", "false" %> |
135 |
| - <%= check_box_tag "extra[git_notify]", (@repository.extra[:git_notify] == 1 ? 'true' : 'false'), (@repository.extra[:git_notify] == 1 ? true : false) %> |
136 |
| - </span> |
| 103 | + <%= hidden_field_tag "extra[git_notify]", "false" %> |
| 104 | + <%= check_box_tag "extra[git_notify]", (@repository.extra[:git_notify] == 1 ? 'true' : 'false'), (@repository.extra[:git_notify] == 1 ? true : false) %> |
137 | 105 | </p>
|
138 | 106 | <% end %>
|
139 | 107 |
|
|
161 | 129 | <%= image_tag (RedmineGitolite::Config.mirroring_keys_installed? ? 'true.png' : 'exclamation.png') %>
|
162 | 130 | </p>
|
163 | 131 |
|
| 132 | + <% unless @repository.new_record? %> |
| 133 | + <p> |
| 134 | + <%= label_tag "", l(:label_repository_exists_in_gitolite) %> |
| 135 | + <%= image_tag (@repository.exists_in_gitolite? ? 'true.png' : 'exclamation.png') %> |
| 136 | + </p> |
| 137 | + |
| 138 | + <p> |
| 139 | + <label><%= l(:label_browse_repository) %></label> |
| 140 | + <%= link_to h(@repository.url), {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => @repository.identifier_param} %> |
| 141 | + </p> |
| 142 | + <% end %> |
| 143 | + |
164 | 144 | <% else %>
|
165 | 145 | <%= repository_field_tags(f, @repository) if @repository %>
|
166 | 146 | <% end %>
|
|
0 commit comments