-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.erb
58 lines (51 loc) · 2.35 KB
/
test.erb
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
<%# This partial is expecting 3 parameters to be defined: -%>
<%# - form - the form object -%>
<%# - existing_creators - list of creators for the current resource (this should be collection of Person objects) -%>
<%# - other_creators - list of non-SEEK creators for the current resource (this should be a string) -%>
<%
resource_type = form.object.class.name.underscore
resource_type_text = text_for_resource(form.object)
collapsed = existing_creators.blank? if collapsed.nil?
%>
<%= folding_panel(t('creator').capitalize.pluralize, collapsed, :body_options => {:id => 'creator_fold_content'},
:help_text => "Here you attribute this #{resource_type_text} to other people.") do %>
<p>
If this <%= resource_type_text %> was contributed by, or together with, other members, please list their names below.
<br/>
<strong>
The <%= t('creator').pluralize -%> you specify will have permissions to 'view and edit summary and contents'.
</strong>
</p>
<p style="color: #666666;"><font color="#FFFFFF" ! important;>
So far you have specified the following <%= t('creator').pluralize -%>:</font>
</p>
<ul id="creators_list" class="box_editing_inner"><font color="#000000">
<li><span class="none_text" id="creators_text"><font color="#000000">Loading...</font></span></li>
</font>
</ul>
<p>
Please type <%= t('creator').pluralize -%> into the box below - suggestions will be displayed as you type.
</p>
<p>
<%= objects_input('creator-typeahead', [], :typeahead => {:query_url => typeahead_people_path + '?query=%QUERY'}) -%>
</p>
<%#= render :partial => 'assets/advanced_creator_select' %>
<p>
If anyone not registered with <%= Seek::Config.application_name %> assisted with the contribution of
this <%= resource_type_text %>, you can specify them below.
</p>
<p>
<%= text_field_tag "#{resource_type}[other_creators]", other_creators, :class => 'form-control' %>
</p>
<% end %>
<script type="text/javascript">
var resourceType = "<%= resource_type -%>";
// recreate internal store of attributions..
var creators = <%= existing_creators.map do |c|
{ id: c.id,
name: c.name,
email: c.email,
projects: c.projects.map(&:title).join(", ") }
end.to_json.html_safe -%>;
updateCreatorSettings(); // ..and update the page to make existing attributions visible
</script>