Commit 92346b7362d9c9f4c62b24f2b6be9efb6e271d7d

Authored by AntonioTerceiro
1 parent e931f2b9

ActionItem158: creating and displaying folders


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1787 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/folder.rb
... ... @@ -5,7 +5,11 @@ class Folder < Article
5 5 end
6 6  
7 7 def self.description
8   - _('A folder, inside which you can put other articles')
  8 + _('A folder, inside which you can put other articles.')
  9 + end
  10 +
  11 + def icon_name
  12 + 'folder'
9 13 end
10 14  
11 15 # FIXME we should not need all this just to write a link
... ...
app/views/cms/_folder.rhtml 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +
  2 +<%# TODO add Textile help here %>
  3 +
  4 +<%= f.text_field('name', :size => '64') %>
  5 +
... ...
public/images/icons-mime/folder.png 0 → 120000
... ... @@ -0,0 +1 @@
  1 +gnome-folder.png
0 2 \ No newline at end of file
... ...
public/images/icons-mime/gnome-folder.png 0 → 100644

1 KB

test/unit/folder_test.rb
... ... @@ -16,6 +16,10 @@ class FolderTest &lt; ActiveSupport::TestCase
16 16 assert_not_equal Article.short_description, Folder.short_description
17 17 end
18 18  
  19 + should 'provide own icon name' do
  20 + assert_not_equal Article.new.icon_name, Folder.new.icon_name
  21 + end
  22 +
19 23 should 'list subitems as HTML content' do
20 24 p = create_user('testuser').person
21 25 f = Folder.create!(:profile => p, :name => 'f')
... ...