From 2b7c6de55c6fa8ef97a784b42986013afaeb6fd9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 21 Mar 2017 15:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_myshixun_extend_repository.html.erb | 18 ++++++ app/views/games/_myshixun_repository.html.erb | 59 +++++++++++++++++++ app/views/games/_repository.html.erb | 46 ++------------- app/views/games/_tree.html.erb | 7 +-- app/views/games/entry.js.erb | 8 ++- app/views/games/show.js.erb | 8 ++- 6 files changed, 98 insertions(+), 48 deletions(-) create mode 100644 app/views/games/_myshixun_extend_repository.html.erb create mode 100644 app/views/games/_myshixun_repository.html.erb diff --git a/app/views/games/_myshixun_extend_repository.html.erb b/app/views/games/_myshixun_extend_repository.html.erb new file mode 100644 index 000000000..7caf4e3ed --- /dev/null +++ b/app/views/games/_myshixun_extend_repository.html.erb @@ -0,0 +1,18 @@ +
+

<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

+
+ + +
+
+
+ <% if params[:action] == "entry" %> +
+ <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content, :extend => true} %> +
+ <% else %> + <% unless @entries.blank? %> + <%= render :partial => 'tree', :locals => { :extend => true} %> + <% end %> + <% end %> +
diff --git a/app/views/games/_myshixun_repository.html.erb b/app/views/games/_myshixun_repository.html.erb new file mode 100644 index 000000000..c91b41d47 --- /dev/null +++ b/app/views/games/_myshixun_repository.html.erb @@ -0,0 +1,59 @@ +
+

+ <%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> +

+
+ <% if params[:action] == "entry" %> + + <% end %> + +
+
+
+ <% if params[:action] == "entry" %> +
+ <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> +
+ <% else %> + <% unless @entries.blank? %> + <%= render :partial => 'tree', :locals => { :extend => false}%> + <% end %> + <% end %> +
+ \ No newline at end of file diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index e10f7b5bf..9a2dfc335 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -1,46 +1,8 @@ -
-
-

<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

-
- - -
-
-
- <% if params[:action] == "entry" %> -
- <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> -
- <% else %> - <% unless @entries.blank? %> - <%= render :partial => 'tree' %> - <% end %> - <% end %> -
+
+ <%= render :partial => 'myshixun_extend_repository' %>
-
-
-

- <%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> -

-
- <% if params[:action] == "entry" %> - - <% end %> - -
-
-
- <% if params[:action] == "entry" %> -
- <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> -
- <% else %> - <% unless @entries.blank? %> - <%= render :partial => 'tree' %> - <% end %> - <% end %> -
+
+ <%= render :partial => 'myshixun_repository' %>