To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / repositories @ 1591:63650ae64bf2
| 1 | 1464:261b3d9a4903 | Chris | <%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root', |
|---|---|---|---|
| 2 | 1115:433d4f72a19b | Chris | :action => 'show', :id => @project, |
| 3 | :repository_id => @repository.identifier_param, |
||
| 4 | :path => nil, :rev => @rev) %> |
||
| 5 | 909:cbb26bc654de | Chris | <% |
| 6 | 0:513646585e45 | Chris | dirs = path.split('/')
|
| 7 | if 'file' == kind |
||
| 8 | filename = dirs.pop |
||
| 9 | end |
||
| 10 | link_path = '' |
||
| 11 | dirs.each do |dir| |
||
| 12 | next if dir.blank? |
||
| 13 | link_path << '/' unless link_path.empty? |
||
| 14 | 909:cbb26bc654de | Chris | link_path << "#{dir}"
|
| 15 | 0:513646585e45 | Chris | %> |
| 16 | 1115:433d4f72a19b | Chris | / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param, |
| 17 | 441:cbce1fd3b1b7 | Chris | :path => to_path_param(link_path), :rev => @rev %> |
| 18 | 0:513646585e45 | Chris | <% end %> |
| 19 | <% if filename %> |
||
| 20 | 441:cbce1fd3b1b7 | Chris | / <%= link_to h(filename), |
| 21 | 1115:433d4f72a19b | Chris | :action => 'changes', :id => @project, :repository_id => @repository.identifier_param, |
| 22 | 441:cbce1fd3b1b7 | Chris | :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
|
| 23 | 0:513646585e45 | Chris | <% end %> |
| 24 | 441:cbce1fd3b1b7 | Chris | <% |
| 25 | # @rev is revsion or Git and Mercurial branch or tag. |
||
| 26 | # For Mercurial *tip*, @rev and @changeset are nil. |
||
| 27 | rev_text = @changeset.nil? ? @rev : format_revision(@changeset) |
||
| 28 | %> |
||
| 29 | <%= "@ #{h rev_text}" unless rev_text.blank? %>
|
||
| 30 | 0:513646585e45 | Chris | |
| 31 | <% html_title(with_leading_slash(path)) -%> |
||
| 32 | 1591:63650ae64bf2 | Chris | <div class="autoscroll" id="browser-autoscroll"> |
| 33 | 0:513646585e45 | Chris | <table class="list entries" id="browser"> |
| 34 | <thead> |
||
| 35 | <tr id="root"> |
||
| 36 | <th><%= l(:field_name) %></th> |
||
| 37 | <th><%= l(:field_filesize) %></th> |
||
| 38 | 441:cbce1fd3b1b7 | Chris | <% if @repository.report_last_commit %> |
| 39 | <th><%= l(:label_revision) %></th> |
||
| 40 | <th><%= l(:label_age) %></th> |
||
| 41 | <th><%= l(:field_author) %></th> |
||
| 42 | <th><%= l(:field_comments) %></th> |
||
| 43 | <% end %> |
||
| 44 | 0:513646585e45 | Chris | </tr> |
| 45 | </thead> |
||
| 46 | <tbody> |
||
| 47 | <%= render :partial => 'dir_list_content' %> |
||
| 48 | </tbody> |
||
| 49 | </table> |
||
| 50 | 1115:433d4f72a19b | Chris | </div> |
| 51 | 0:513646585e45 | Chris | <% @entries.each do |entry| %> |
| 52 | <% tr_id = Digest::MD5.hexdigest(entry.path) |
||
| 53 | depth = params[:depth].to_i %> |
||
| 54 | 441:cbce1fd3b1b7 | Chris | <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> |
| 55 | <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> |
||
| 56 | 0:513646585e45 | Chris | <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
| 57 | 441:cbce1fd3b1b7 | Chris | <td style="padding-left: <%=18 * depth%>px;" class="<%= |
| 58 | 1115:433d4f72a19b | Chris | @repository.report_last_commit ? "filename" : "filename_no_report" %>"> |
| 59 | 0:513646585e45 | Chris | <% if entry.is_dir? %> |
| 60 | 1115:433d4f72a19b | Chris | <span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
| 61 | 909:cbb26bc654de | Chris | :action => 'show', |
| 62 | :id => @project, |
||
| 63 | 1115:433d4f72a19b | Chris | :repository_id => @repository.identifier_param, |
| 64 | 909:cbb26bc654de | Chris | :path => to_path_param(ent_path), |
| 65 | :rev => @rev, |
||
| 66 | :depth => (depth + 1), |
||
| 67 | 1115:433d4f72a19b | Chris | :parent_id => tr_id)) %>');"> </span> |
| 68 | 0:513646585e45 | Chris | <% end %> |
| 69 | 245:051f544170fe | Chris | <%= link_to h(ent_name), |
| 70 | 1116:bb32da3bea34 | Chris | {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
| 71 | 245:051f544170fe | Chris | :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
| 72 | 0:513646585e45 | Chris | </td> |
| 73 | <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
||
| 74 | 441:cbce1fd3b1b7 | Chris | <% if @repository.report_last_commit %> |
| 75 | 1115:433d4f72a19b | Chris | <td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td> |
| 76 | 0:513646585e45 | Chris | <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
| 77 | 1115:433d4f72a19b | Chris | <td class="author"><%= entry.author %></td> |
| 78 | 1517:dffacf8a6908 | Chris | <td class="comments"><%= entry.changeset.comments.truncate(50) if entry.changeset %></td> |
| 79 | 441:cbce1fd3b1b7 | Chris | <% end %> |
| 80 | 0:513646585e45 | Chris | </tr> |
| 81 | <% end %> |
||
| 82 | 1115:433d4f72a19b | Chris | <%= error_messages_for 'repository' %> |
| 83 | |||
| 84 | <div class="box tabular"> |
||
| 85 | <p> |
||
| 86 | <%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
|
||
| 87 | <% if @repository && ! @repository.class.scm_available %> |
||
| 88 | <em class="info error"><%= l(:text_scm_command_not_available) %></em> |
||
| 89 | <% end %> |
||
| 90 | </p> |
||
| 91 | |||
| 92 | <p><%= f.check_box :is_default, :label => :field_repository_is_default %></p> |
||
| 93 | 1464:261b3d9a4903 | Chris | <p> |
| 94 | <%= f.text_field :identifier, :disabled => @repository.identifier_frozen? %> |
||
| 95 | 1115:433d4f72a19b | Chris | <% unless @repository.identifier_frozen? %> |
| 96 | 1464:261b3d9a4903 | Chris | <em class="info"> |
| 97 | <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> |
||
| 98 | </em> |
||
| 99 | <% end %> |
||
| 100 | </p> |
||
| 101 | 1115:433d4f72a19b | Chris | |
| 102 | <% button_disabled = true %> |
||
| 103 | <% if @repository %> |
||
| 104 | 1464:261b3d9a4903 | Chris | <% button_disabled = ! @repository.class.scm_available %> |
| 105 | <%= repository_field_tags(f, @repository) %> |
||
| 106 | 1115:433d4f72a19b | Chris | <% end %> |
| 107 | </div> |
||
| 108 | |||
| 109 | <p> |
||
| 110 | <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save), :disabled => button_disabled) %> |
||
| 111 | 1464:261b3d9a4903 | Chris | <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %> |
| 112 | 1115:433d4f72a19b | Chris | </p> |
| 113 | 0:513646585e45 | Chris | <% if @entry && @entry.kind == 'file' %> |
| 114 | |||
| 115 | <p> |
||
| 116 | 1115:433d4f72a19b | Chris | <%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
| 117 | 0:513646585e45 | Chris | <% if @repository.supports_cat? %> |
| 118 | 1115:433d4f72a19b | Chris | <%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
| 119 | 0:513646585e45 | Chris | <% end %> |
| 120 | <% if @repository.supports_annotate? %> |
||
| 121 | 1115:433d4f72a19b | Chris | <%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> |
|
| 122 | 0:513646585e45 | Chris | <% end %> |
| 123 | 1115:433d4f72a19b | Chris | <%= link_to(l(:button_download), |
| 124 | {:action => 'raw', :id => @project,
|
||
| 125 | :repository_id => @repository.identifier_param, |
||
| 126 | :path => to_path_param(@path), |
||
| 127 | :rev => @rev}) if @repository.supports_cat? %> |
||
| 128 | 0:513646585e45 | Chris | <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
|
| 129 | </p> |
||
| 130 | |||
| 131 | <% end %> |
||
| 132 | <% content_for :header_tags do %> |
||
| 133 | <%= javascript_include_tag 'repository_navigation' %> |
||
| 134 | <% end %> |
||
| 135 | |||
| 136 | 1115:433d4f72a19b | Chris | <%= link_to l(:label_statistics), |
| 137 | {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
|
||
| 138 | :class => 'icon icon-stats' if @repository.supports_all_revisions? %> |
||
| 139 | 908:c6c2cbd0afee | Chris | |
| 140 | 897:b293eb7e5c94 | chris | <%= link_to_revision_archive(@repository, @rev, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
| 141 | 0:513646585e45 | Chris | |
| 142 | 1115:433d4f72a19b | Chris | <%= form_tag({:action => controller.action_name,
|
| 143 | :id => @project, |
||
| 144 | :repository_id => @repository.identifier_param, |
||
| 145 | :path => to_path_param(@path), |
||
| 146 | :rev => nil}, |
||
| 147 | {:method => :get, :id => 'revision_selector'}) do -%>
|
||
| 148 | 0:513646585e45 | Chris | <!-- Branches Dropdown --> |
| 149 | <% if !@repository.branches.nil? && @repository.branches.length > 0 -%> |
||
| 150 | | <%= l(:label_branch) %>: |
||
| 151 | 1115:433d4f72a19b | Chris | <%= select_tag :branch, |
| 152 | options_for_select([''] + @repository.branches, @rev), |
||
| 153 | :id => 'branch' %> |
||
| 154 | 0:513646585e45 | Chris | <% end -%> |
| 155 | |||
| 156 | <% if !@repository.tags.nil? && @repository.tags.length > 0 -%> |
||
| 157 | | <%= l(:label_tag) %>: |
||
| 158 | 1115:433d4f72a19b | Chris | <%= select_tag :tag, |
| 159 | options_for_select([''] + @repository.tags, @rev), |
||
| 160 | :id => 'tag' %> |
||
| 161 | 0:513646585e45 | Chris | <% end -%> |
| 162 | |||
| 163 | 1115:433d4f72a19b | Chris | <% if @repository.supports_all_revisions? %> |
| 164 | | <%= l(:label_revision) %>: |
||
| 165 | <%= text_field_tag 'rev', @rev, :size => 8 %> |
||
| 166 | 1464:261b3d9a4903 | Chris | <% end %> |
| 167 | 0:513646585e45 | Chris | <% end -%> |
| 168 | 741:496b3cfa2f36 | chris | |
| 169 | |||
| 170 | 1115:433d4f72a19b | Chris | <% manage_allowed = User.current.allowed_to?(:manage_related_issues, @repository.project) %> |
| 171 | |||
| 172 | <div id="related-issues"> |
||
| 173 | <% if manage_allowed %> |
||
| 174 | <div class="contextual"> |
||
| 175 | <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'issue_id'} %>
|
||
| 176 | </div> |
||
| 177 | <% end %> |
||
| 178 | |||
| 179 | <h3><%= l(:label_related_issues) %></h3> |
||
| 180 | <ul> |
||
| 181 | <% @changeset.issues.visible.each do |issue| %> |
||
| 182 | <li id="<%= "related-issue-#{issue.id}" %>"><%= link_to_issue issue %>
|
||
| 183 | <%= link_to(image_tag('link_break.png'),
|
||
| 184 | {:controller => 'repositories', :action => 'remove_related_issue',
|
||
| 185 | :id => @project, :repository_id => @repository.identifier_param, |
||
| 186 | :rev => @changeset.identifier, :issue_id => issue}, |
||
| 187 | :remote => true, |
||
| 188 | :method => :delete, |
||
| 189 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 190 | :title => l(:label_relation_delete)) if manage_allowed %> |
||
| 191 | </li> |
||
| 192 | <% end %> |
||
| 193 | </ul> |
||
| 194 | |||
| 195 | <% if manage_allowed %> |
||
| 196 | <%= form_for(@issue, :as => :issue, :remote => true, |
||
| 197 | :url => {:controller => 'repositories', :action => 'add_related_issue',
|
||
| 198 | :id => @project, :repository_id => @repository.identifier_param, |
||
| 199 | :rev => @changeset.identifier}, |
||
| 200 | :method => :post, |
||
| 201 | :html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %>
|
||
| 202 | <%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %> |
||
| 203 | <%= submit_tag l(:button_add) %> |
||
| 204 | <%= toggle_link l(:button_cancel), 'new-relation-form'%> |
||
| 205 | <% end %> |
||
| 206 | <% end %> |
||
| 207 | </div> |
||
| 208 | |||
| 209 | <%= javascript_tag "observeAutocompleteField('issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => 'all')}')" %>
|
||
| 210 | <%= javascript_tag do %> |
||
| 211 | function revisionGraphHandler(){
|
||
| 212 | drawRevisionGraph( |
||
| 213 | document.getElementById('holder'),
|
||
| 214 | <%= commits.to_json.html_safe %>, |
||
| 215 | <%= space %> |
||
| 216 | ); |
||
| 217 | } |
||
| 218 | $(document).ready(revisionGraphHandler); |
||
| 219 | $(window).resize(revisionGraphHandler); |
||
| 220 | <% end %> |
||
| 221 | 909:cbb26bc654de | Chris | |
| 222 | 1115:433d4f72a19b | Chris | <div id="holder" class="revision-graph"></div> |
| 223 | 909:cbb26bc654de | Chris | |
| 224 | 1115:433d4f72a19b | Chris | <% content_for :header_tags do %> |
| 225 | <%= javascript_include_tag 'raphael' %> |
||
| 226 | <%= javascript_include_tag 'revision_graph' %> |
||
| 227 | <% end %> |
||
| 228 | 909:cbb26bc654de | Chris | <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %> |
| 229 | 1115:433d4f72a19b | Chris | <%= if show_revision_graph && revisions && revisions.any? |
| 230 | indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid| |
||
| 231 | url_for( |
||
| 232 | :controller => 'repositories', |
||
| 233 | :action => 'revision', |
||
| 234 | :id => project, |
||
| 235 | :repository_id => @repository.identifier_param, |
||
| 236 | :rev => scmid) |
||
| 237 | end |
||
| 238 | render :partial => 'revision_graph', |
||
| 239 | :locals => {
|
||
| 240 | :commits => indexed_commits, |
||
| 241 | :space => graph_space |
||
| 242 | } |
||
| 243 | end %> |
||
| 244 | <%= form_tag( |
||
| 245 | {:controller => 'repositories', :action => 'diff', :id => project,
|
||
| 246 | :repository_id => @repository.identifier_param, :path => to_path_param(path)}, |
||
| 247 | :method => :get |
||
| 248 | ) do %> |
||
| 249 | 0:513646585e45 | Chris | <table class="list changesets"> |
| 250 | <thead><tr> |
||
| 251 | <th>#</th> |
||
| 252 | <th></th> |
||
| 253 | <th></th> |
||
| 254 | <th><%= l(:label_date) %></th> |
||
| 255 | <th><%= l(:field_author) %></th> |
||
| 256 | <th><%= l(:field_comments) %></th> |
||
| 257 | </tr></thead> |
||
| 258 | <tbody> |
||
| 259 | <% show_diff = revisions.size > 1 %> |
||
| 260 | <% line_num = 1 %> |
||
| 261 | <% revisions.each do |changeset| %> |
||
| 262 | <tr class="changeset <%= cycle 'odd', 'even' %>"> |
||
| 263 | 1115:433d4f72a19b | Chris | <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
| 264 | <%= content_tag(:td, :class => 'id', :style => id_style) do %> |
||
| 265 | <%= link_to_revision(changeset, @repository) %> |
||
| 266 | 909:cbb26bc654de | Chris | <% end %> |
| 267 | 1115:433d4f72a19b | Chris | <td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
| 268 | <td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||
| 269 | 0:513646585e45 | Chris | <td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
| 270 | 1517:dffacf8a6908 | Chris | <td class="author"><%= changeset.author.to_s.truncate(30) %></td> |
| 271 | 1115:433d4f72a19b | Chris | <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> |
| 272 | 0:513646585e45 | Chris | </tr> |
| 273 | <% line_num += 1 %> |
||
| 274 | <% end %> |
||
| 275 | </tbody> |
||
| 276 | </table> |
||
| 277 | <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %> |
||
| 278 | <% end %> |
||
| 279 | 1115:433d4f72a19b | Chris | <% if @issue %> |
| 280 | $('#related-issues').html('<%= escape_javascript(render :partial => "related_issues") %>');
|
||
| 281 | $('#related-issue-<%= @issue.id %>').effect("highlight");
|
||
| 282 | $('#issue_id').focus();
|
||
| 283 | <% else %> |
||
| 284 | alert("<%= raw(escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid'))) %>");
|
||
| 285 | <% end %> |
||
| 286 | 0:513646585e45 | Chris | <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
| 287 | |||
| 288 | <div class="contextual"> |
||
| 289 | <%= render :partial => 'navigation' %> |
||
| 290 | </div> |
||
| 291 | |||
| 292 | <h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||
| 293 | |||
| 294 | 1115:433d4f72a19b | Chris | <%= render :partial => 'link_to_functions' %> |
| 295 | 0:513646585e45 | Chris | |
| 296 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
||
| 297 | |||
| 298 | <div class="autoscroll"> |
||
| 299 | <table class="filecontent annotate syntaxhl"> |
||
| 300 | <tbody> |
||
| 301 | 1115:433d4f72a19b | Chris | <% line_num = 1; previous_revision = nil %> |
| 302 | <% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %> |
||
| 303 | 909:cbb26bc654de | Chris | <% revision = @annotate.revisions[line_num - 1] %> |
| 304 | 1464:261b3d9a4903 | Chris | <tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
| 305 | <th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th> |
||
| 306 | 909:cbb26bc654de | Chris | <td class="revision"> |
| 307 | 1464:261b3d9a4903 | Chris | <% if revision && revision != previous_revision %> |
| 308 | <%= revision.identifier ? |
||
| 309 | link_to_revision(revision, @repository) : format_revision(revision) %> |
||
| 310 | <% end %> |
||
| 311 | </td> |
||
| 312 | <td class="author"> |
||
| 313 | <% if revision && revision != previous_revision %> |
||
| 314 | <% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s, |
||
| 315 | @repository.repo_log_encoding) %> |
||
| 316 | <%= author.split('<').first %>
|
||
| 317 | <% end %> |
||
| 318 | </td> |
||
| 319 | 1115:433d4f72a19b | Chris | <td class="line-code"><pre><%= line.html_safe %></pre></td> |
| 320 | 909:cbb26bc654de | Chris | </tr> |
| 321 | 1115:433d4f72a19b | Chris | <% line_num += 1; previous_revision = revision %> |
| 322 | 0:513646585e45 | Chris | <% end %> |
| 323 | </tbody> |
||
| 324 | </table> |
||
| 325 | </div> |
||
| 326 | |||
| 327 | <% html_title(l(:button_annotate)) -%> |
||
| 328 | |||
| 329 | <% content_for :header_tags do %> |
||
| 330 | <%= stylesheet_link_tag 'scm' %> |
||
| 331 | <% end %> |
||
| 332 | <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||
| 333 | |||
| 334 | <div class="contextual"> |
||
| 335 | <%= render :partial => 'navigation' %> |
||
| 336 | </div> |
||
| 337 | |||
| 338 | 1115:433d4f72a19b | Chris | <h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
|
| 339 | 0:513646585e45 | Chris | |
| 340 | 1115:433d4f72a19b | Chris | <%= render :partial => 'link_to_functions' %> |
| 341 | 0:513646585e45 | Chris | |
| 342 | <%= render_properties(@properties) %> |
||
| 343 | |||
| 344 | 909:cbb26bc654de | Chris | <%= render(:partial => 'revisions', |
| 345 | 0:513646585e45 | Chris | :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
|
| 346 | |||
| 347 | 1115:433d4f72a19b | Chris | <% content_for :header_tags do %> |
| 348 | <%= stylesheet_link_tag "scm" %> |
||
| 349 | <% end %> |
||
| 350 | |||
| 351 | 0:513646585e45 | Chris | <% html_title(l(:label_change_plural)) -%> |
| 352 | <h2><%= l(:label_repository) %></h2> |
||
| 353 | |||
| 354 | <%= simple_format(l(:text_repository_usernames_mapping)) %> |
||
| 355 | |||
| 356 | <% if @committers.empty? %> |
||
| 357 | <p class="nodata"><%= l(:label_no_data) %></p> |
||
| 358 | <% else %> |
||
| 359 | |||
| 360 | 1115:433d4f72a19b | Chris | <%= form_tag({}) do %>
|
| 361 | 0:513646585e45 | Chris | <table class="list"> |
| 362 | <thead> |
||
| 363 | 909:cbb26bc654de | Chris | <tr> |
| 364 | <th><%= l(:field_login) %></th> |
||
| 365 | <th><%= l(:label_user) %></th> |
||
| 366 | </tr> |
||
| 367 | 0:513646585e45 | Chris | </thead> |
| 368 | <tbody> |
||
| 369 | <% i = 0 -%> |
||
| 370 | <% @committers.each do |committer, user_id| -%> |
||
| 371 | 909:cbb26bc654de | Chris | <tr class="<%= cycle 'odd', 'even' %>"> |
| 372 | <td><%=h committer %></td> |
||
| 373 | <td> |
||
| 374 | <%= hidden_field_tag "committers[#{i}][]", committer %>
|
||
| 375 | 1115:433d4f72a19b | Chris | <%= select_tag "committers[#{i}][]",
|
| 376 | content_tag( |
||
| 377 | 'option', |
||
| 378 | "-- #{l :actionview_instancetag_blank_option} --",
|
||
| 379 | :value => '' |
||
| 380 | ) + |
||
| 381 | options_from_collection_for_select( |
||
| 382 | @users, 'id', 'name', user_id.to_i |
||
| 383 | ) %> |
||
| 384 | 909:cbb26bc654de | Chris | </td> |
| 385 | </tr> |
||
| 386 | <% i += 1 -%> |
||
| 387 | 0:513646585e45 | Chris | <% end -%> |
| 388 | </tbody> |
||
| 389 | </table> |
||
| 390 | 1517:dffacf8a6908 | Chris | <p><%= submit_tag(l(:button_save)) %></p> |
| 391 | 0:513646585e45 | Chris | <% end %> |
| 392 | |||
| 393 | 909:cbb26bc654de | Chris | <% end %> |
| 394 | 119:8661b858af72 | Chris | <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2> |
| 395 | 0:513646585e45 | Chris | |
| 396 | <!-- Choose view type --> |
||
| 397 | 1115:433d4f72a19b | Chris | <%= form_tag({:action => 'diff', :id => @project,
|
| 398 | :repository_id => @repository.identifier_param, |
||
| 399 | :path => to_path_param(@path), :rev=> @rev}, :method => 'get') do %> |
||
| 400 | 0:513646585e45 | Chris | <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
|
| 401 | 909:cbb26bc654de | Chris | <p> |
| 402 | 1115:433d4f72a19b | Chris | <%= l(:label_view_diff) %>: |
| 403 | <label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label> |
||
| 404 | <label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label> |
||
| 405 | 909:cbb26bc654de | Chris | </p> |
| 406 | 0:513646585e45 | Chris | <% end %> |
| 407 | |||
| 408 | <% cache(@cache_key) do -%> |
||
| 409 | 1115:433d4f72a19b | Chris | <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %>
|
| 410 | 0:513646585e45 | Chris | <% end -%> |
| 411 | |||
| 412 | <% other_formats_links do |f| %> |
||
| 413 | 909:cbb26bc654de | Chris | <%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %> |
| 414 | 0:513646585e45 | Chris | <% end %> |
| 415 | |||
| 416 | <% html_title(with_leading_slash(@path), 'Diff') -%> |
||
| 417 | |||
| 418 | <% content_for :header_tags do %> |
||
| 419 | <%= stylesheet_link_tag "scm" %> |
||
| 420 | <% end %> |
||
| 421 | 1115:433d4f72a19b | Chris | <h2><%= l(:label_repository) %></h2> |
| 422 | |||
| 423 | <%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put, :id => 'repository-form'} do |f| %>
|
||
| 424 | <%= render :partial => 'form', :locals => {:f => f} %>
|
||
| 425 | <% end %> |
||
| 426 | 0:513646585e45 | Chris | <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
| 427 | |||
| 428 | <div class="contextual"> |
||
| 429 | <%= render :partial => 'navigation' %> |
||
| 430 | </div> |
||
| 431 | |||
| 432 | <h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
||
| 433 | |||
| 434 | 1115:433d4f72a19b | Chris | <%= render :partial => 'link_to_functions' %> |
| 435 | 0:513646585e45 | Chris | |
| 436 | 1082:997f6d7738f7 | chris | <% if @display_raw %> |
| 437 | 1083:0d837624e795 | chris | <% if @content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte %> |
| 438 | <em><%= l(:text_data_too_large) %></em> |
||
| 439 | <% else %> |
||
| 440 | <em><%= l(:text_binary_data) %></em> |
||
| 441 | <% end %> |
||
| 442 | 1082:997f6d7738f7 | chris | <% else %> |
| 443 | <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||
| 444 | <% end %> |
||
| 445 | 0:513646585e45 | Chris | |
| 446 | <% content_for :header_tags do %> |
||
| 447 | <%= stylesheet_link_tag "scm" %> |
||
| 448 | <% end %> |
||
| 449 | 1115:433d4f72a19b | Chris | <h2><%= l(:label_repository_new) %></h2> |
| 450 | |||
| 451 | <%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
||
| 452 | <%= render :partial => 'form', :locals => {:f => f} %>
|
||
| 453 | <% end %> |
||
| 454 | $('#content').html('<%= escape_javascript(render :template => 'repositories/new', :formats => [:html]) %>');
|
||
| 455 | $('#related-issue-<%= @issue.id %>').remove();
|
||
| 456 | 0:513646585e45 | Chris | <div class="contextual"> |
| 457 | 741:496b3cfa2f36 | chris | |
| 458 | <%= link_to_revision_archive(@repository, @changeset, @project, { :text => l(:label_download_revision), :class => 'icon icon-package' }) %>
|
||
| 459 | |
||
| 460 | |||
| 461 | 0:513646585e45 | Chris | « |
| 462 | <% unless @changeset.previous.nil? -%> |
||
| 463 | 1115:433d4f72a19b | Chris | <%= link_to_revision(@changeset.previous, @repository, :text => l(:label_previous)) %> |
| 464 | 0:513646585e45 | Chris | <% else -%> |
| 465 | <%= l(:label_previous) %> |
||
| 466 | <% end -%> |
||
| 467 | 741:496b3cfa2f36 | chris | |
| 468 | 0:513646585e45 | Chris | <% unless @changeset.next.nil? -%> |
| 469 | 1115:433d4f72a19b | Chris | <%= link_to_revision(@changeset.next, @repository, :text => l(:label_next)) %> |
| 470 | 0:513646585e45 | Chris | <% else -%> |
| 471 | <%= l(:label_next) %> |
||
| 472 | <% end -%> |
||
| 473 | » |
||
| 474 | |||
| 475 | 1115:433d4f72a19b | Chris | <%= form_tag({:controller => 'repositories',
|
| 476 | 441:cbce1fd3b1b7 | Chris | :action => 'revision', |
| 477 | :id => @project, |
||
| 478 | 1115:433d4f72a19b | Chris | :repository_id => @repository.identifier_param, |
| 479 | 441:cbce1fd3b1b7 | Chris | :rev => nil}, |
| 480 | :method => :get) do %> |
||
| 481 | 117:af80e5618e9b | Chris | <%= text_field_tag 'rev', @rev, :size => 8 %> |
| 482 | 0:513646585e45 | Chris | <%= submit_tag 'OK', :name => nil %> |
| 483 | <% end %> |
||
| 484 | 741:496b3cfa2f36 | chris | |
| 485 | 0:513646585e45 | Chris | </div> |
| 486 | |||
| 487 | 1115:433d4f72a19b | Chris | <h2><%= avatar(@changeset.user, :size => "24") %><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2> |
| 488 | 0:513646585e45 | Chris | |
| 489 | 1115:433d4f72a19b | Chris | <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %> |
| 490 | 909:cbb26bc654de | Chris | <table class="revision-info"> |
| 491 | 1115:433d4f72a19b | Chris | <% if @changeset.scmid.present? %> |
| 492 | 909:cbb26bc654de | Chris | <tr> |
| 493 | <td>ID</td><td><%= h(@changeset.scmid) %></td> |
||
| 494 | </tr> |
||
| 495 | <% end %> |
||
| 496 | 1115:433d4f72a19b | Chris | <% if @changeset.parents.present? %> |
| 497 | 909:cbb26bc654de | Chris | <tr> |
| 498 | <td><%= l(:label_parent_revision) %></td> |
||
| 499 | <td> |
||
| 500 | <%= @changeset.parents.collect{
|
||
| 501 | 1115:433d4f72a19b | Chris | |p| link_to_revision(p, @repository, :text => format_revision(p)) |
| 502 | }.join(", ").html_safe %>
|
||
| 503 | 909:cbb26bc654de | Chris | </td> |
| 504 | </tr> |
||
| 505 | <% end %> |
||
| 506 | 1115:433d4f72a19b | Chris | <% if @changeset.children.present? %> |
| 507 | 909:cbb26bc654de | Chris | <tr> |
| 508 | <td><%= l(:label_child_revision) %></td> |
||
| 509 | <td> |
||
| 510 | <%= @changeset.children.collect{
|
||
| 511 | 1115:433d4f72a19b | Chris | |p| link_to_revision(p, @repository, :text => format_revision(p)) |
| 512 | }.join(", ").html_safe %>
|
||
| 513 | 909:cbb26bc654de | Chris | </td> |
| 514 | </tr> |
||
| 515 | <% end %> |
||
| 516 | </table> |
||
| 517 | 1115:433d4f72a19b | Chris | <% end %> |
| 518 | |||
| 519 | 909:cbb26bc654de | Chris | <p> |
| 520 | <span class="author"> |
||
| 521 | <%= authoring(@changeset.committed_on, @changeset.author) %> |
||
| 522 | </span> |
||
| 523 | </p> |
||
| 524 | 0:513646585e45 | Chris | |
| 525 | <%= textilizable @changeset.comments %> |
||
| 526 | |||
| 527 | 1115:433d4f72a19b | Chris | <% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %> |
| 528 | <%= render :partial => 'related_issues' %> |
||
| 529 | 0:513646585e45 | Chris | <% end %> |
| 530 | |||
| 531 | <% if User.current.allowed_to?(:browse_repository, @project) %> |
||
| 532 | <h3><%= l(:label_attachment_plural) %></h3> |
||
| 533 | <ul id="changes-legend"> |
||
| 534 | 441:cbce1fd3b1b7 | Chris | <li class="change change-A"><%= l(:label_added) %></li> |
| 535 | 0:513646585e45 | Chris | <li class="change change-M"><%= l(:label_modified) %></li> |
| 536 | 441:cbce1fd3b1b7 | Chris | <li class="change change-C"><%= l(:label_copied) %></li> |
| 537 | <li class="change change-R"><%= l(:label_renamed) %></li> |
||
| 538 | <li class="change change-D"><%= l(:label_deleted) %></li> |
||
| 539 | 0:513646585e45 | Chris | </ul> |
| 540 | |||
| 541 | 441:cbce1fd3b1b7 | Chris | <p><%= link_to(l(:label_view_diff), |
| 542 | :action => 'diff', |
||
| 543 | :id => @project, |
||
| 544 | 1115:433d4f72a19b | Chris | :repository_id => @repository.identifier_param, |
| 545 | 441:cbce1fd3b1b7 | Chris | :path => "", |
| 546 | 1115:433d4f72a19b | Chris | :rev => @changeset.identifier) if @changeset.filechanges.any? %></p> |
| 547 | 0:513646585e45 | Chris | |
| 548 | <div class="changeset-changes"> |
||
| 549 | <%= render_changeset_changes %> |
||
| 550 | </div> |
||
| 551 | <% end %> |
||
| 552 | |||
| 553 | <% content_for :header_tags do %> |
||
| 554 | <%= stylesheet_link_tag "scm" %> |
||
| 555 | <% end %> |
||
| 556 | |||
| 557 | 1464:261b3d9a4903 | Chris | <% |
| 558 | title = "#{l(:label_revision)} #{format_revision(@changeset)}"
|
||
| 559 | 1517:dffacf8a6908 | Chris | title << " - #{@changeset.comments.truncate(80)}"
|
| 560 | 1464:261b3d9a4903 | Chris | html_title(title) |
| 561 | -%> |
||
| 562 | 0:513646585e45 | Chris | <div class="contextual"> |
| 563 | 1115:433d4f72a19b | Chris | <%= form_tag( |
| 564 | {:controller => 'repositories', :action => 'revision', :id => @project,
|
||
| 565 | :repository_id => @repository.identifier_param}, |
||
| 566 | :method => :get |
||
| 567 | ) do %> |
||
| 568 | <%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %> |
||
| 569 | <%= submit_tag 'OK' %> |
||
| 570 | 0:513646585e45 | Chris | <% end %> |
| 571 | </div> |
||
| 572 | |||
| 573 | <h2><%= l(:label_revision_plural) %></h2> |
||
| 574 | |||
| 575 | 441:cbce1fd3b1b7 | Chris | <%= render :partial => 'revisions', |
| 576 | :locals => {:project => @project,
|
||
| 577 | 909:cbb26bc654de | Chris | :path => '', |
| 578 | 441:cbce1fd3b1b7 | Chris | :revisions => @changesets, |
| 579 | :entry => nil } %> |
||
| 580 | 0:513646585e45 | Chris | |
| 581 | <p class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></p> |
||
| 582 | |||
| 583 | <% content_for :header_tags do %> |
||
| 584 | 1115:433d4f72a19b | Chris | <%= stylesheet_link_tag "scm" %> |
| 585 | <%= auto_discovery_link_tag( |
||
| 586 | 441:cbce1fd3b1b7 | Chris | :atom, |
| 587 | params.merge( |
||
| 588 | {:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||
| 589 | 0:513646585e45 | Chris | <% end %> |
| 590 | |||
| 591 | <% other_formats_links do |f| %> |
||
| 592 | 909:cbb26bc654de | Chris | <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
| 593 | 0:513646585e45 | Chris | <% end %> |
| 594 | |||
| 595 | <% html_title(l(:label_revision_plural)) -%> |
||
| 596 | <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||
| 597 | |||
| 598 | <div class="contextual"> |
||
| 599 | <%= render :partial => 'navigation' %> |
||
| 600 | </div> |
||
| 601 | |||
| 602 | 1115:433d4f72a19b | Chris | <h2><%= render :partial => 'breadcrumbs', |
| 603 | :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
|
||
| 604 | 0:513646585e45 | Chris | |
| 605 | <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||
| 606 | 1115:433d4f72a19b | Chris | <%= render :partial => 'dir_list' %> |
| 607 | 0:513646585e45 | Chris | <% end %> |
| 608 | |||
| 609 | <%= render_properties(@properties) %> |
||
| 610 | |||
| 611 | 441:cbce1fd3b1b7 | Chris | <% if authorize_for('repositories', 'revisions') %>
|
| 612 | 1115:433d4f72a19b | Chris | <% if @changesets && !@changesets.empty? %> |
| 613 | <h3><%= l(:label_latest_revision_plural) %></h3> |
||
| 614 | <%= render :partial => 'revisions', |
||
| 615 | 441:cbce1fd3b1b7 | Chris | :locals => {:project => @project, :path => @path,
|
| 616 | :revisions => @changesets, :entry => nil }%> |
||
| 617 | 1115:433d4f72a19b | Chris | <% end %> |
| 618 | <p> |
||
| 619 | <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) |
||
| 620 | sep = '' %> |
||
| 621 | <% if @repository.supports_all_revisions? && @path.blank? %> |
||
| 622 | <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, |
||
| 623 | :repository_id => @repository.identifier_param %> |
||
| 624 | <% sep = '|' %> |
||
| 625 | <% end %> |
||
| 626 | <% if @repository.supports_directory_revisions? && |
||
| 627 | ( has_branches || !@path.blank? || !@rev.blank? ) %> |
||
| 628 | <%= sep %> |
||
| 629 | <%= link_to l(:label_view_revisions), |
||
| 630 | 441:cbce1fd3b1b7 | Chris | :action => 'changes', |
| 631 | :path => to_path_param(@path), |
||
| 632 | :id => @project, |
||
| 633 | 1115:433d4f72a19b | Chris | :repository_id => @repository.identifier_param, |
| 634 | :rev => @rev %> |
||
| 635 | <% end %> |
||
| 636 | </p> |
||
| 637 | <% if @repository.supports_all_revisions? %> |
||
| 638 | <% content_for :header_tags do %> |
||
| 639 | <%= auto_discovery_link_tag( |
||
| 640 | 441:cbce1fd3b1b7 | Chris | :atom, params.merge( |
| 641 | {:format => 'atom', :action => 'revisions',
|
||
| 642 | :id => @project, :page => nil, :key => User.current.rss_key})) %> |
||
| 643 | 1115:433d4f72a19b | Chris | <% end %> |
| 644 | 0:513646585e45 | Chris | |
| 645 | 1115:433d4f72a19b | Chris | <% other_formats_links do |f| %> |
| 646 | <%= f.link_to 'Atom', |
||
| 647 | :url => {:action => 'revisions', :id => @project,
|
||
| 648 | :repository_id => @repository.identifier_param, |
||
| 649 | :key => User.current.rss_key} %> |
||
| 650 | <% end %> |
||
| 651 | <% end %> |
||
| 652 | <% end %> |
||
| 653 | 741:496b3cfa2f36 | chris | |
| 654 | 1115:433d4f72a19b | Chris | <% if @repositories.size > 1 %> |
| 655 | <% content_for :sidebar do %> |
||
| 656 | <h3><%= l(:label_repository_plural) %></h3> |
||
| 657 | <p> |
||
| 658 | <%= @repositories.sort.collect {|repo|
|
||
| 659 | link_to h(repo.name), |
||
| 660 | {:controller => 'repositories', :action => 'show',
|
||
| 661 | :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil}, |
||
| 662 | :class => 'repository' + (repo == @repository ? ' selected' : '') |
||
| 663 | }.join('<br />').html_safe %>
|
||
| 664 | </p> |
||
| 665 | <% end %> |
||
| 666 | 0:513646585e45 | Chris | <% end %> |
| 667 | |||
| 668 | <% content_for :header_tags do %> |
||
| 669 | 1115:433d4f72a19b | Chris | <%= stylesheet_link_tag "scm" %> |
| 670 | 0:513646585e45 | Chris | <% end %> |
| 671 | |||
| 672 | <% html_title(l(:label_repository)) -%> |
||
| 673 | <h2><%= l(:label_statistics) %></h2> |
||
| 674 | |||
| 675 | <p> |
||
| 676 | 1464:261b3d9a4903 | Chris | <%= tag("embed",
|
| 677 | :type => "image/svg+xml", :src => url_for(:controller => 'repositories', |
||
| 678 | :action => 'graph', :id => @project, |
||
| 679 | :repository_id => @repository.identifier_param, |
||
| 680 | :graph => "commits_per_month")) %> |
||
| 681 | 0:513646585e45 | Chris | </p> |
| 682 | <p> |
||
| 683 | 1464:261b3d9a4903 | Chris | <%= tag("embed",
|
| 684 | :type => "image/svg+xml", :src => url_for(:controller => 'repositories', |
||
| 685 | :action => 'graph', :id => @project, |
||
| 686 | :repository_id => @repository.identifier_param, |
||
| 687 | :graph => "commits_per_author")) %> |
||
| 688 | 0:513646585e45 | Chris | </p> |
| 689 | |||
| 690 | <p><%= link_to l(:button_back), :action => 'show', :id => @project %></p> |
||
| 691 | |||
| 692 | <% html_title(l(:label_repository), l(:label_statistics)) -%> |