From c86c5c31cfc36dd85dc445c72acd2379e66d6c8f Mon Sep 17 00:00:00 2001 From: Renan Teruo + Paulo Meirelles Date: Fri, 18 May 2012 17:58:47 -0300 Subject: [PATCH] [Mezuro] Now, upon accessing a project that doesn't exist in Kalibro, warns the user and gives the option of deleting it or recreating it. Recreating doesn't work yet, though. --- plugins/mezuro/lib/mezuro_plugin/project_content.rb | 1 + plugins/mezuro/views/content_viewer/show_project.rhtml | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/plugins/mezuro/lib/mezuro_plugin/project_content.rb b/plugins/mezuro/lib/mezuro_plugin/project_content.rb index 6ca5472..51a05a5 100644 --- a/plugins/mezuro/lib/mezuro_plugin/project_content.rb +++ b/plugins/mezuro/lib/mezuro_plugin/project_content.rb @@ -50,6 +50,7 @@ class MezuroPlugin::ProjectContent < Article private + #FIXME def validate_kalibro_project_name begin Kalibro::Client::ProjectClient.project(name) diff --git a/plugins/mezuro/views/content_viewer/show_project.rhtml b/plugins/mezuro/views/content_viewer/show_project.rhtml index 046e635..bca2d98 100644 --- a/plugins/mezuro/views/content_viewer/show_project.rhtml +++ b/plugins/mezuro/views/content_viewer/show_project.rhtml @@ -1,6 +1,12 @@ <% @project = @page.project %> +<% if (@project==nil) %> +

Warning:

+

This project doesn't exist on the Web Service. Do you want to delete or save it again?

+<% else %> + + @@ -43,4 +49,5 @@
+<% end %> -- libgit2 0.21.2
<%= _('Name') %>