Project

General

Profile

Feature #4273 » scm-info-view.diff

Toshi MARUYAMA, 2011-02-18 14:03

View differences:

app/controllers/admin_controller.rb
82 82
      [:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
83 83
      [:text_rmagick_available, Object.const_defined?(:Magick)]
84 84
    ]
85
  end  
85
    @scm_info = []
86
    Redmine::Scm::Base.all.each do |scm|
87
      scm_class = "Repository::#{scm}".constantize
88
      @scm_info << {:name             => scm_class.scm_name,
89
                    :command          => scm_class.scm_command,
90
                    :version_string   => scm_class.scm_version_string,
91
                    :available        => scm_class.scm_available}
92
    end
93
  end
86 94
end
app/views/admin/info.rhtml
11 11
<% end %>
12 12
</table>
13 13

  
14
<h3><%=l(:label_scm)%></h3>
15

  
16
<table class="list">
17
	<thead>
18
		<tr>
19
			<th><%=l(:label_scm_name)%></th>
20
			<th><%=l(:label_scm_command)%></th>
21
			<th><%=l(:label_version)%></th>
22
			<th></th>
23
		</tr>
24
	</thead>
25
	<tbody>
26
		<% @scm_info.each do |scm| %>
27
			<tr class="<%= cycle 'odd', 'even' %>">
28
				<td><%= scm[:name] %></td>
29
				<td><%= scm[:command] %></td>
30
				<td><%= scm[:version_string] %></td>
31
				<td><%= image_tag((scm[:available] ? 'true.png' : 'exclamation.png'),
32
							:style => "vertical-align:bottom;") %></td>
33
			</tr>
34
		<% end %>
35
	</tbody>
36
</table>
37

  
14 38
<% html_title(l(:label_information_plural)) -%>
config/locales/en.yml
793 793
  label_project_copy_notifications: Send email notifications during the project copy
794 794
  label_principal_search: "Search for user or group:"
795 795
  label_user_search: "Search for user:"
796
  label_scm_name: Name
797
  label_scm_command: Command
796 798
  
797 799
  button_login: Login
798 800
  button_submit: Submit
(4-4/9)