<% if dspace_content.allow_create?(user) %>
<% if dspace_content.is_a? DspacePlugin::Library %>
<%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "DspacePlugin::Communityy", :parent_id => dspace_content.id}), :class => 'button with-text icon-add') do %>
<%= _("Add %s") % DspacePlugin::Communityy.short_description %>
<% end %>
<% elsif dspace_content.is_a? DspacePlugin::Communityy %>
<%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "DspacePlugin::Collection", :parent_id => dspace_content.id}), :class => 'button with-text icon-add') do %>
<%= _("Add %s") % DspacePlugin::Collection.short_description %>
<% end %>
<% end %>
<% end %>
<% if dspace_content.is_a? DspacePlugin::Library %>
<% communities = dspace_content.communities %>
<%= render :partial => 'community', :collection => communities %>
<% elsif dspace_content.is_a? DspacePlugin::Communityy %>
<% community_id = dspace_content.dspace_community_id %>
<% dspace_server = dspace_content.parent.dspace_server_url %>
<% collections = dspace_content.collections dspace_server, community_id %>
<%= render :partial => 'collection', :collection => collections %>
<% elsif dspace_content.is_a? DspacePlugin::Collection %>
<% collection_id = dspace_content.dspace_collection_id %>
<% dspace_server = dspace_content.parent.parent.dspace_server_url %>
<%= render :partial => 'item', :collection => dspace_content.items(dspace_server, collection_id) %>
<% end %>