dspace_content.html.erb
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div id="dspace_library">
<% if dspace_content.allow_create?(user) %>
<div id="actions">
<% 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 %>
</div>
<% end %>
<% if dspace_content.is_a? DspacePlugin::Library %>
<% communities = dspace_content.communities %>
<ul id="communities_list">
<%= render :partial => 'community', :collection => communities %>
</ul>
<% 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 %>
<ul id="collections_list">
<%= render :partial => 'collection', :collection => collections %>
</ul>
<% elsif dspace_content.is_a? DspacePlugin::Collection %>
<% collection_id = dspace_content.dspace_collection_id %>
<% dspace_server = dspace_content.parent.parent.dspace_server_url %>
<div id="dspace_library">
<div id="dspace_collection">
<ul id="items_list">
<%= render :partial => 'item', :collection => dspace_content.items(dspace_server, collection_id) %>
</ul>
</div>
</div>
<% end %>
</div>