Commit e12b2116f9396a5e1e2d34ba5a20d6a1ad60aca8
1 parent
2435c525
Exists in
master
and in
29 other branches
ActionItem158: made the "select article type" a lightbox_dialog
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1291 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
6 additions
and
4 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
@@ -50,7 +50,7 @@ class CmsController < MyProfileController | @@ -50,7 +50,7 @@ class CmsController < MyProfileController | ||
50 | :description => type.description | 50 | :description => type.description |
51 | }) | 51 | }) |
52 | end | 52 | end |
53 | - render :action => 'select_article_type' | 53 | + render :action => 'select_article_type', :layout => false |
54 | return | 54 | return |
55 | end | 55 | end |
56 | 56 |
app/views/cms/select_article_type.rhtml
@@ -3,8 +3,10 @@ | @@ -3,8 +3,10 @@ | ||
3 | <ul id="article_types"> | 3 | <ul id="article_types"> |
4 | <% for type in @article_types %> | 4 | <% for type in @article_types %> |
5 | <li> | 5 | <li> |
6 | - <%= link_to type[:short_description], :action => 'new', :type => type[:name] %> | 6 | + <%= link_to type[:short_description], :action => 'new', :type => type[:name], :parent_id => params[:parent_id] %> |
7 | <br/> <%= type[:description] %> | 7 | <br/> <%= type[:description] %> |
8 | </li> | 8 | </li> |
9 | <% end %> | 9 | <% end %> |
10 | </ul> | 10 | </ul> |
11 | + | ||
12 | +<%= lightbox_close_button(_('Cancel')) %> |
app/views/cms/view.rhtml
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | </h2> | 11 | </h2> |
12 | 12 | ||
13 | <% button_bar(:style => 'margin-bottom: 1em;') do %> | 13 | <% button_bar(:style => 'margin-bottom: 1em;') do %> |
14 | - <%= button('new', _('New article'), :action => 'new') %> | 14 | + <%= lightbox_button('new', _('New article'), :action => 'new') %> |
15 | <% end %> | 15 | <% end %> |
16 | 16 | ||
17 | <% end %> | 17 | <% end %> |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | <% if @article %> | 37 | <% if @article %> |
38 | <% button_bar(:class => 'file-manager-controls') do %> | 38 | <% button_bar(:class => 'file-manager-controls') do %> |
39 | <% if @article.allow_children? %> | 39 | <% if @article.allow_children? %> |
40 | - <%= button('new', _('New subitem'), :action => 'new', :parent_id => @article.id) %> | 40 | + <%= lightbox_button('new', _('New subitem'), :action => 'new', :parent_id => @article.id) %> |
41 | <% end %> | 41 | <% end %> |
42 | <%= button('up', _('Go up one level'), :action => (@article.parent ? 'view' : 'index'), :id => @article.parent) %> | 42 | <%= button('up', _('Go up one level'), :action => (@article.parent ? 'view' : 'index'), :id => @article.parent) %> |
43 | <% end %> | 43 | <% end %> |