Commit cbcb5e587b6ad8fea106e6d67b4cdf3d7a474a73

Authored by Antonio Terceiro
1 parent 0d84f345

ActionItem1049: general review while working on the new icon theme

app/controllers/my_profile/profile_design_controller.rb
... ... @@ -5,7 +5,7 @@ class ProfileDesignController < BoxOrganizerController
5 5 protect 'edit_profile_design', :profile
6 6  
7 7 def available_blocks
8   - blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, LinkListBlock, MyNetworkBlock, FeedReaderBlock ]
  8 + blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, LinkListBlock, MyNetworkBlock, FeedReaderBlock, ProfileImageBlock ]
9 9  
10 10 # blocks exclusive for organizations
11 11 if profile.has_members?
... ... @@ -20,7 +20,6 @@ class ProfileDesignController < BoxOrganizerController
20 20  
21 21 # blocks exclusive for enterprises
22 22 if profile.enterprise?
23   - blocks << ProfileImageBlock
24 23 blocks << LocalizationBlock
25 24 blocks << DisabledEnterpriseMessageBlock
26 25 end
... ...
app/helpers/boxes_helper.rb
... ... @@ -190,7 +190,7 @@ module BoxesHelper
190 190  
191 191 if !block.main?
192 192 buttons << icon_button(:eyes, _('Toggle block visibility'), {:action => 'toggle_visibility', :id => block.id})
193   - buttons << icon_button(:delete, _('Remove block'), { :action => 'remove', :id => block.id }, { :method => 'post'})
  193 + buttons << icon_button(:delete, _('Remove block'), { :action => 'remove', :id => block.id }, { :method => 'post', :confirm => _('Are you sure you want to remove this block?')})
194 194 end
195 195  
196 196 if block.respond_to?(:help)
... ...
app/views/cms/media_listing.rhtml
... ... @@ -7,7 +7,7 @@
7 7 %>
8 8 <%= javascript_include_tag :defaults %>
9 9 <%= javascript_include_tag 'lowpro' %>
10   - <%= stylesheet_link_tag '/designs/icons/default/style.css' %>
  10 + <%= icon_theme_stylesheet_tag %>
11 11 </head>
12 12 <body class='noosfero'>
13 13 <script type="text/javascript">
... ...
app/views/cms/view.rhtml
1 1 <h1>
2   - <%= icon('cms') %>
3 2 <%= _('Content management') %>
4 3 </h1>
5 4  
... ... @@ -15,7 +14,7 @@
15 14 <% parent_id = ((@article && @article.allow_children?) ? @article : nil) %>
16 15  
17 16 <% if !@article or !@article.blog? %>
18   - <%= button :add, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
  17 + <%= button :newfolder, _('New folder'), :action => 'new', :type => 'Folder', :parent_id => parent_id %>
19 18 <% end %>
20 19 <%= lightbox_button('new', label_for_new_article(@article), :action => 'new', :parent_id => parent_id) %>
21 20 <%= button('upload-file', _('Upload files'), :action => 'upload_files', :parent_id => parent_id) %>
... ... @@ -30,6 +29,21 @@
30 29 <th><%= _('Actions') %></th>
31 30 </tr>
32 31  
  32 + <% if @article %>
  33 + <tr>
  34 + <td>
  35 + <%= image_tag 'icons-mime/gnome-folder.png' %>
  36 + <% if @article.parent %>
  37 + <%= link_to '.. (parent folder)', :action => 'view', :id => @article.parent.id %>
  38 + <% else %>
  39 + <%= link_to '.. (parent folder)', :action => 'index' %>
  40 + <% end %>
  41 + </td>
  42 + <td><%= Folder.short_description %></td>
  43 + <td> </td>
  44 + </tr>
  45 + <% end %>
  46 +
33 47 <%# folders %>
34 48 <% for folder in @folders %>
35 49 <tr>
... ... @@ -69,9 +83,4 @@
69 83 </tr>
70 84 <% end %>
71 85  
72   - <% if @subitems.empty? || @folders.empty? %>
73   - <tr><td colspan='3' align='center'><em><%= _('None') %></em></td></tr>
74   - <% end %>
75   -
76   -
77 86 </table>
... ...
app/views/cms/why_categorize.rhtml
... ... @@ -5,5 +5,5 @@
5 5 </p>
6 6  
7 7 <% button_bar do %>
8   - <%= lightbox_close_button _('OK') %>
  8 + <%= lightbox_close_button _('Close') %>
9 9 <% end %>
... ...
app/views/content_viewer/_article.rhtml
1   -<%= link_to '', article.url, '', :class => article.css_class_name) %>
  1 +<%= link_to '', article.url, :class => article.css_class_name %>
2 2 <span><%= link_to article.title, article.view_url %></span>
... ...
app/views/content_viewer/view_page.rhtml
... ... @@ -21,17 +21,10 @@
21 21 </div>
22 22 <% end; end %>
23 23  
24   -<div onmouseover="showArticleActions(true)"
25   - onmouseout="showArticleActions(false)">
  24 +<div>
26 25 <%= article_title(@page, :no_link => true) %>
27   - <script type="text/javascript">
28   - function showArticleActions( show ) {
29   - var act = $("article-actions");
30   - if ( act ) act.className = ( show ? "show" : "hidden" );
31   - }
32   - </script>
33 26 <% if logged_in? && current_user.person.has_permission?('post_content', profile) %>
34   - <div id="article-actions" class="hidden">
  27 + <div id="article-actions">
35 28 <% unless @page.blog? %>
36 29 <%= link_to content_tag( 'span', label_for_edit_article(@page) ),
37 30 profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id }),
... ... @@ -43,16 +36,17 @@
43 36 profile.admin_url.merge({ :controller => 'cms', :action => 'destroy', :id => @page }),
44 37 :class => 'button with-text icon-delete' %>
45 38 <% end %>
46   - <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') %>
  39 + <% if profile.kind_of?(Person) && !environment.enabled?('disable_cms') && !@page.folder? %>
47 40 <%= link_to content_tag( 'span', _('Spread this') ),
48 41 profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page }),
49 42 :class => 'button with-text icon-spread' %>
50 43 <% end %>
51   - <% if @page.display_as_gallery? %>
52   - <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
53   - <% else %>
  44 + <% if !@page.display_as_gallery? %>
54 45 <%= lightbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) %>
55 46 <% end %>
  47 + <% if @page.folder? %>
  48 + <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent))) %>
  49 + <% end %>
56 50 <% end %>
57 51 <% if profile.kind_of?(Enterprise) && @page.display_as_gallery? %>
58 52 <%= button('upload-file', _('Upload files'), :controller => 'cms', :action => 'upload_files', :parent_id => (@page.folder? ? @page : @page.parent)) %>
... ...
app/views/shared/user_menu.rhtml
... ... @@ -36,7 +36,7 @@
36 36 </li>
37 37  
38 38 <% if user.is_admin?(environment) %>
39   - <li><%= link_to( '<span class="icon-menu-"></span>'+ _('Admin'),
  39 + <li><%= link_to( '<span class="icon-menu-admin"></span>'+ _('Admin'),
40 40 {:controller => 'admin_panel' },
41 41 :id => 'link_admin_panel',
42 42 :help => _('Access the site administration panel.')
... ...
config/routes.rb
... ... @@ -23,6 +23,11 @@ ActionController::Routing::Routes.draw do |map|
23 23  
24 24 map.connect 'images/*stuff', :controller => 'not_found', :action => 'index'
25 25 map.connect 'stylesheets/*stuff', :controller => 'not_found', :action => 'index'
  26 + map.connect 'designs/*stuff', :controller => 'not_found', :action => 'index'
  27 + map.connect 'articles/*stuff', :controller => 'not_found', :action => 'index'
  28 + map.connect 'javascripts/*stuff', :controller => 'not_found', :action => 'index'
  29 + map.connect 'thumbnails/*stuff', :controller => 'not_found', :action => 'index'
  30 + map.connect 'user_themes/*stuff', :controller => 'not_found', :action => 'index'
26 31  
27 32 # user account controller
28 33 map.connect 'account/new_password/:code', :controller => 'account', :action => 'new_password'
... ...
public/designs/icons/default/style.css
... ... @@ -2,6 +2,7 @@
2 2 .icon-home { background-image: url(gnome-home.png) }
3 3 .icon-new { background-image: url(new-HC.gif) }
4 4 .icon-close { background-image: url(cancel-HC.gif) }
  5 +.icon-newfolder { background-image: url(add-HC.gif) }
5 6 .icon-open { background-image: url(folder-open.gif) }
6 7 .icon-cms { background-image: url(abiword_48.png) }
7 8 .icon-save { background-image: url(save-HC.gif) }
... ...
public/stylesheets/article.css
... ... @@ -10,10 +10,6 @@
10 10 right: -17px;
11 11 padding-right: 15px;
12 12 }
13   -#article-actions.hidden {
14   - opacity: 0.5;
15   - filter: alpha(opacity=50);
16   -}
17 13  
18 14 #article-tags {
19 15 font-size: 10px;
... ...