Commit c86c5c31cfc36dd85dc445c72acd2379e66d6c8f
Committed by
Renan Teruo Carneiro
1 parent
1c5141ee
Exists in
master
and in
29 other branches
[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.
Showing
2 changed files
with
8 additions
and
0 deletions
Show diff stats
plugins/mezuro/lib/mezuro_plugin/project_content.rb
@@ -50,6 +50,7 @@ class MezuroPlugin::ProjectContent < Article | @@ -50,6 +50,7 @@ class MezuroPlugin::ProjectContent < Article | ||
50 | 50 | ||
51 | private | 51 | private |
52 | 52 | ||
53 | + #FIXME | ||
53 | def validate_kalibro_project_name | 54 | def validate_kalibro_project_name |
54 | begin | 55 | begin |
55 | Kalibro::Client::ProjectClient.project(name) | 56 | Kalibro::Client::ProjectClient.project(name) |
plugins/mezuro/views/content_viewer/show_project.rhtml
1 | <script src="/plugins/mezuro/javascripts/project_content.js" type="text/javascript"></script> | 1 | <script src="/plugins/mezuro/javascripts/project_content.js" type="text/javascript"></script> |
2 | 2 | ||
3 | <% @project = @page.project %> | 3 | <% @project = @page.project %> |
4 | +<% if (@project==nil) %> | ||
5 | + <h3>Warning:</h3> | ||
6 | + <p>This project doesn't exist on the Web Service. Do you want to <a href="/myprofile/<%= @page.profile.name %>/cms/destroy/<%= @page.id%>">delete</a> or <a href="/myprofile/<%= @page.profile.name %>/cms/edit/<%= @page.id%>">save it again</a>?</p> | ||
7 | +<% else %> | ||
8 | + | ||
9 | + | ||
4 | <table> | 10 | <table> |
5 | <tr> | 11 | <tr> |
6 | <td><%= _('Name') %></td> | 12 | <td><%= _('Name') %></td> |
@@ -43,4 +49,5 @@ | @@ -43,4 +49,5 @@ | ||
43 | <div id="project-tree"></div> | 49 | <div id="project-tree"></div> |
44 | <div id="module-result"> | 50 | <div id="module-result"> |
45 | </div> | 51 | </div> |
52 | +<% end %> | ||
46 | 53 |