diff --git a/app/models/folder.rb b/app/models/folder.rb index 1e1ed9c..699ee49 100644 --- a/app/models/folder.rb +++ b/app/models/folder.rb @@ -5,7 +5,11 @@ class Folder < Article end def self.description - _('A folder, inside which you can put other articles') + _('A folder, inside which you can put other articles.') + end + + def icon_name + 'folder' end # FIXME we should not need all this just to write a link diff --git a/app/views/cms/_folder.rhtml b/app/views/cms/_folder.rhtml new file mode 100644 index 0000000..b5d9993 --- /dev/null +++ b/app/views/cms/_folder.rhtml @@ -0,0 +1,5 @@ + +<%# TODO add Textile help here %> + +<%= f.text_field('name', :size => '64') %> + diff --git a/public/images/icons-mime/folder.png b/public/images/icons-mime/folder.png new file mode 120000 index 0000000..0bd6da1 --- /dev/null +++ b/public/images/icons-mime/folder.png @@ -0,0 +1 @@ +gnome-folder.png \ No newline at end of file diff --git a/public/images/icons-mime/gnome-folder.png b/public/images/icons-mime/gnome-folder.png new file mode 100644 index 0000000..b624ae8 Binary files /dev/null and b/public/images/icons-mime/gnome-folder.png differ diff --git a/test/unit/folder_test.rb b/test/unit/folder_test.rb index ac7ad5a..842336c 100644 --- a/test/unit/folder_test.rb +++ b/test/unit/folder_test.rb @@ -16,6 +16,10 @@ class FolderTest < ActiveSupport::TestCase assert_not_equal Article.short_description, Folder.short_description end + should 'provide own icon name' do + assert_not_equal Article.new.icon_name, Folder.new.icon_name + end + should 'list subitems as HTML content' do p = create_user('testuser').person f = Folder.create!(:profile => p, :name => 'f') -- libgit2 0.21.2