From 2d07809eac55b7293e6203a2de0c7d1ab20c354b Mon Sep 17 00:00:00 2001 From: Fellipe Souto Sampaio Date: Wed, 13 Nov 2013 19:08:23 -0200 Subject: [PATCH] Trying to create a gif animation to show while the processing isn't ready. --- app/controllers/modules_controller.rb | 4 +++- app/views/modules/_javascript.html.erb | 1 + app/views/repositories/show.html.erb | 8 ++++++++ config/routes.rb | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 app/views/modules/_javascript.html.erb diff --git a/app/controllers/modules_controller.rb b/app/controllers/modules_controller.rb index 376dcf5..4446a9c 100644 --- a/app/controllers/modules_controller.rb +++ b/app/controllers/modules_controller.rb @@ -32,6 +32,8 @@ class ModulesController < ApplicationController end # POST /project/1/repositories/42/modules/24 - def load_tree; end + def load_tree + render :partial => "modules/javascript.html.erb" + end end \ No newline at end of file diff --git a/app/views/modules/_javascript.html.erb b/app/views/modules/_javascript.html.erb new file mode 100644 index 0000000..2c03e28 --- /dev/null +++ b/app/views/modules/_javascript.html.erb @@ -0,0 +1 @@ +

Testando um gif animado! GAN

\ No newline at end of file diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 0759b15..cea7c3e 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -36,6 +36,14 @@ <% end %>
+
+ <% if @processing.ready? %>

Modules Tree

diff --git a/config/routes.rb b/config/routes.rb index 1f77e11..5e75828 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,7 +6,7 @@ Mezuro::Application.routes.draw do resources :projects do resources :repositories, except: [:update, :index] - get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module + get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module put '/repositories/:id' => 'repositories#update', as: :repository_update post '/repositories/:id/modules/:module_result_id' => 'modules#load_tree', as: :load_module_tree end -- libgit2 0.21.2