atrium 0.0.1.alpha → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/GETTING_STARTED.textile +50 -57
  2. data/Gemfile.lock +2 -0
  3. data/README.mkd +30 -20
  4. data/ROADMAP.mkd +92 -0
  5. data/app/assets/javascripts/atrium/atrium.js +19 -0
  6. data/app/assets/stylesheets/atrium/atrium.css +2 -0
  7. data/app/controllers/atrium/collections_controller.rb +2 -12
  8. data/app/controllers/atrium/exhibits_controller.rb +5 -17
  9. data/app/controllers/atrium/showcases_controller.rb +21 -73
  10. data/app/models/atrium/showcase.rb +6 -0
  11. data/app/views/atrium/collections/_form.html.erb +12 -7
  12. data/app/views/atrium/collections/_navigation.html.erb +30 -25
  13. data/app/views/atrium/collections/edit.html.erb +1 -0
  14. data/app/views/atrium/collections/show.html.erb +9 -0
  15. data/app/views/atrium/descriptions/index.html.erb +4 -0
  16. data/app/views/atrium/exhibits/_form.html.erb +8 -1
  17. data/app/views/atrium/exhibits/_navigation.html.erb +30 -0
  18. data/app/views/atrium/exhibits/show.html.erb +9 -1
  19. data/app/views/atrium/showcases/show.html.erb +1 -1
  20. data/app/views/catalog/index.html.erb +7 -1
  21. data/app/views/layouts/atrium.html.erb +3 -27
  22. data/app/views/shared/_collection_search_form.html.erb +1 -1
  23. data/app/views/shared/_featured_sources.html.erb +3 -0
  24. data/app/views/shared/_list_descriptions.html.erb +3 -2
  25. data/atrium.gemspec +2 -4
  26. data/lib/atrium/atrium_helper_behavior.rb +3 -6
  27. data/lib/atrium/catalog.rb +1 -1
  28. data/lib/atrium/collections_helper.rb +33 -0
  29. data/lib/atrium/descriptions_helper.rb +4 -0
  30. data/lib/atrium/routes.rb +2 -1
  31. data/lib/atrium/solr_helper.rb +4 -4
  32. data/lib/atrium/version.rb +1 -1
  33. data/test_support/spec/controllers/atrium/showcases_controller_spec.rb +34 -0
  34. data/test_support/spec/helpers/atrium_solr_helper_spec.rb +16 -6
  35. metadata +184 -171
@@ -21,16 +21,13 @@ class Atrium::ShowcasesController < Atrium::BaseController
21
21
  @atrium_showcase = Atrium::Showcase.find(params[:id])
22
22
  #TODO move this update to model rather in controller
23
23
  unless session[:folder_document_ids].blank?
24
- @atrium_showcase.showcase_items ||= Hash.new
25
- selected_document_ids = session[:folder_document_ids]
26
- @atrium_showcase.showcase_items[:type]="featured"
27
- @atrium_showcase.showcase_items[:solr_doc_ids]=selected_document_ids.join(',')
28
- else
29
- @atrium_showcase.showcase_items={}
24
+ selected_document_ids = session[:folder_document_ids] || []
25
+ #logger.debug("selected items: #{selected_document_ids.inspect}, session:#{session[:folder_document_ids].inspect}")
26
+ @atrium_showcase.showcase_items=selected_document_ids
30
27
  end
31
28
  @atrium_showcase.save
32
-
33
- session_folder_ids= [] || session[:copy_folder_document_ids]
29
+ session_folder_ids= session[:copy_folder_document_ids] || []
30
+ #logger.debug("Showcase after updating featured: #{@atrium_showcase.inspect}, folder_document_ids to set:#{session_folder_ids.inspect}")
34
31
  session[:folder_document_ids] = session_folder_ids
35
32
  session[:copy_folder_document_ids]=nil
36
33
  if @atrium_showcase && !@atrium_showcase.showcase_items[:solr_doc_ids].nil?
@@ -41,6 +38,22 @@ class Atrium::ShowcasesController < Atrium::BaseController
41
38
  end
42
39
  end
43
40
 
41
+ def remove_featured
42
+ @atrium_showcase = Atrium::Showcase.find(params[:id])
43
+ text=''
44
+ if params[:solr_doc_id] && @atrium_showcase.showcase_items && @atrium_showcase.showcase_items[:solr_doc_ids]
45
+ @featured_items = @atrium_showcase.showcase_items[:solr_doc_ids].split(',') || []
46
+ @featured_items.delete_if {|x| x.eql?(params[:solr_doc_id]) }
47
+ @atrium_showcase.showcase_items=@featured_items
48
+ @atrium_showcase.save
49
+ text = 'Document with id '+params[:solr_doc_id] +' was remove from featured successfully.'
50
+ end
51
+ #logger.debug("Showcase after updating featured: #{@atrium_showcase.inspect}")
52
+
53
+ flash[:notice] = text
54
+ render :text => text
55
+ end
56
+
44
57
  def featured
45
58
  session[:copy_folder_document_ids] = session[:folder_document_ids]
46
59
  session[:folder_document_ids] = []
@@ -125,69 +138,4 @@ private
125
138
  def unset_edit_showcase_in_session
126
139
  session[:edit_showcase] = nil
127
140
  end
128
-
129
- #def configure_showcase
130
- # unless @atrium_showcase
131
- # @atrium_showcase=Atrium::Showcase.find(params[:id])
132
- # end
133
- # @exhibit_navigation_data = get_exhibit_navigation_data
134
- # set_edit_showcase_in_session
135
- # if @atrium_showcase.for_exhibit?
136
- # redirect_to atrium_exhibit_path(:id=>@atrium_showcase.showcases_id, :f=>params[:f])
137
- # else
138
- # @atrium_collection= Atrium::Collection.find_by_id(@atrium_showcase.showcases_id)
139
- # redirect_to atrium_collection_showcase_path(:id=>@atrium_showcase.showcases_id, :showcase_id=>params[:id])
140
- # end
141
- #end
142
-
143
- #def index
144
- # @exhibit = Atrium::Exhibit.find(params[:exhibit_id])
145
- # @exhibit_navigation_data = get_exhibit_navigation_data
146
- # set_edit_showcase_in_session
147
- # redirect_to atrium_collection_path(:id=>@exhibit.atrium_collection_id, :exhibit_number=>@exhibit.id)
148
- #end
149
-
150
- #def create
151
- # @atrium_showcase = Atrium::Showcase.new(params[:atrium_exhibit_id])
152
- # @atrium_showcase.showcase_items ||= Hash.new
153
- # logger.info("atrium_showcase = #{@atrium_showcase.inspect}")
154
- # @atrium_showcase.save
155
- # logger.info("atrium_showcase = #{@atrium_showcase.inspect}")
156
- # set_edit_showcase_in_session
157
- # if @atrium_showcase.showcases_type=="Atrium::Exhibit"
158
- # redirect_to atrium_exhibit_path(:id=>@atrium_showcase.showcases_id, :f=>params[:facet_selection])
159
- # else
160
- # redirect_to atrium_collection_showcase_path(@atrium_showcase.showcases_id, @atrium_showcase.id, :f=>params[:facet_selection])
161
- # end
162
- #end
163
-
164
- #def edit
165
- #@atrium_showcase = Atrium::Showcase.find(params[:id])
166
- #set_edit_showcase_in_session
167
- #redirect_to parent_url(@atrium_showcase)
168
- #if @atrium_showcase.showcases_type=="atrium_exhibit"
169
- # redirect_to atrium_exhibit_path(:id=>@atrium_showcase.showcases_id, :f=>params[:facet_selection])
170
- #else
171
- # redirect_to atrium_collection_showcase_path(@atrium_showcase.showcases_id, params[:id], :f=>params[:f])
172
- #end
173
- #end
174
-
175
- #def update
176
- # @atrium_showcase = Atrium::Showcase.find(params[:showcase_id])
177
- # if @atrium_showcase.update_attributes(params[:atrium_showcase])
178
- # flash[:notice] = 'Browse was successfully updated.'
179
- # end
180
- # redirect_to :action => "edit", :id=>@atrium_showcase.id, :f=>params[:f]
181
- #end
182
-
183
- #def selected_featured
184
- # @atrium_showcase = Atrium::Showcase.find(params[:id])
185
- # selected_document_ids = session[:folder_document_ids]
186
- # session[:folder_document_ids] = session[:copy_folder_document_ids]
187
- # @response, @documents = get_solr_response_for_field_values("id",selected_document_ids || [])
188
- # render :layout => false, :locals=>{:selected_document_ids=>selected_document_ids}
189
- #end
190
-
191
-
192
-
193
141
  end
@@ -79,6 +79,12 @@ class Atrium::Showcase < ActiveRecord::Base
79
79
  read_attribute(:showcase_items) || write_attribute(:showcase_items, {})
80
80
  end
81
81
 
82
+ def showcase_items=(solr_doc_ids = [])
83
+ showcase_items[:type]="featured"
84
+ showcase_items[:solr_doc_ids]=solr_doc_ids.join(',')
85
+ write_attribute(:showcase_items, showcase_items)
86
+ end
87
+
82
88
  def solr_doc_ids
83
89
  showcase_items[:solr_doc_ids] unless showcase_items.blank?
84
90
  end
@@ -1,3 +1,7 @@
1
+
2
+ <% content_for :atrium_side_bar do %>
3
+ <%= render :partial => 'atrium/collections/edit_navigation' %>
4
+ <% end %>
1
5
  <%= form_for(@atrium_collection, :html => {:class => "atrium"}) do |f| %>
2
6
  <fieldset>
3
7
  <legend>Basic Configuration</legend>
@@ -83,11 +87,12 @@
83
87
  <% else %>
84
88
  <em>There are no exhibits in this collection.</em>
85
89
  <% end %>
86
-
87
- <%= form_for(@atrium_exhibit) do |exhibit| %>
88
- <%- @atrium_exhibit.set_number = @atrium_collection.exhibits.size + 1 -%>
89
- <%- @atrium_exhibit.atrium_collection_id = @atrium_collection[:id] -%>
90
- <%= exhibit.hidden_field :set_number %>
91
- <%= exhibit.hidden_field :atrium_collection_id %>
92
- <%= exhibit.submit 'Add a Exhibit to this Collection', :class => 'button' %>
90
+ <% if can_add_view_exhibit? %>
91
+ <%= form_for(@atrium_exhibit) do |exhibit| %>
92
+ <%- @atrium_exhibit.set_number = @atrium_collection.exhibits.size + 1 -%>
93
+ <%- @atrium_exhibit.atrium_collection_id = @atrium_collection[:id] -%>
94
+ <%= exhibit.hidden_field :set_number %>
95
+ <%= exhibit.hidden_field :atrium_collection_id %>
96
+ <%= exhibit.submit 'Add a Exhibit to this Collection', :class => 'button' %>
97
+ <% end %>
93
98
  <% end %>
@@ -3,43 +3,48 @@
3
3
  <%= link_to "Configure Collection #{@atrium_exhbit}" , edit_atrium_collection_path(@atrium_collection[:id]), :class => "customize"%>
4
4
  </p>
5
5
  <% end %>
6
- <%= link_to 'View Collection', @atrium_collection %>
6
+ <%= link_to 'View Collection', @atrium_collection %>
7
+
7
8
 
8
9
  <div id="browse-navigation" class="facet-list">
9
- <% if @exhibit_navigation_data.nil? || @exhibit_navigation_data.empty? %>
10
- <ul>
11
- <% @atrium_collection.exhibits.each do |exhibit| %>
12
- <li>
13
- <%= link_to "View #{exhibit.pretty_title}", exhibit %>
14
- </li>
15
- <% if can? :edit, Atrium::Exhibit %>
10
+ <% if can_add_view_exhibit? %>
11
+ <% if @exhibit_navigation_data.nil? || @exhibit_navigation_data.empty? %>
12
+ <ul>
13
+ <% @atrium_collection.exhibits.each do |exhibit| %>
16
14
  <li>
17
- <%= link_to "Customize #{exhibit.pretty_title}", new_atrium_exhibit_showcases_path(exhibit, :facet_selection => params[:f]), :class => "customize" %>
15
+ <%= link_to "View #{exhibit.pretty_title}", exhibit %>
18
16
  </li>
17
+ <% if can? :edit, Atrium::Exhibit %>
18
+ <li>
19
+ <%= link_to "Customize #{exhibit.pretty_title}", new_atrium_exhibit_showcases_path(exhibit, :facet_selection => params[:f]), :class => "customize" %>
20
+ </li>
21
+ <% end %>
19
22
  <% end %>
20
- <% end %>
21
- </ul>
22
- <% else %>
23
- <%# Recursively render the browse sets. %>
24
- <% @exhibit_navigation_data.each do |exhibit| %>
25
- <h3 class="facet-heading <%= exhibit.pretty_title%>">
26
- <%= link_to exhibit.pretty_title, exhibit %>
27
- </h3>
28
- <% unless exhibit.browse_levels.nil? || exhibit.browse_levels.empty? %>
29
- <%= render :partial => 'shared/navigation_browse_levels',
23
+ </ul>
24
+ <% else %>
25
+ <%# Recursively render the browse sets. %>
26
+ <% @exhibit_navigation_data.each do |exhibit| %>
27
+ <h3 class="facet-heading <%= exhibit.pretty_title%>">
28
+ <%= link_to exhibit.pretty_title, exhibit %>
29
+ </h3>
30
+ <% unless exhibit_scoped_to_items?(exhibit.id) %>
31
+ <% unless exhibit.browse_levels.nil? || exhibit.browse_levels.empty? %>
32
+ <%= render :partial => 'shared/navigation_browse_levels',
30
33
  :locals=>{
31
34
  :exhibit_number => exhibit.set_number,
32
35
  :browse_levels => exhibit.browse_levels,
33
36
  :browse_facets => exhibit.browse_facet_names,
34
37
  :exhibit_id => exhibit[:id]
35
- }%>
38
+ }%>
39
+ <% end %>
40
+ <% end %>
36
41
  <% end %>
37
42
  <% end %>
38
43
  <% end %>
39
-
40
- <% if can? :edit, Atrium::Showcase %>
41
- <% if !session[:edit_showcase] && !params[:atrium_collection_browse] && !params[:atrium_exhibit_browse] %>
42
- <%= link_to "Customize this page", get_customize_page_path, :class => "customize"%>
43
- <% end %>
44
+ <% if can? :edit, Atrium::Showcase %>
45
+ <% if !session[:edit_showcase] && !params[:atrium_collection_browse] && !params[:atrium_exhibit_browse] %>
46
+ <%= link_to "Customize this page", get_customize_page_path, :class => "customize"%>
44
47
  <% end %>
48
+ <% end %>
45
49
  </div>
50
+
@@ -1,3 +1,4 @@
1
+
1
2
  <h1>Editing Collection</h1>
2
3
 
3
4
  <%= render :partial => "form" %>
@@ -1,3 +1,12 @@
1
+ <% content_for :atrium_side_bar do %>
2
+ <% if is_editing? %>
3
+ <%= render :partial => 'atrium/showcases/showcase_navigation' %>
4
+ <% else %>
5
+ <%= render :partial => 'shared/collection_search_form' %>
6
+ <%= render :partial => 'atrium/collections/navigation' %>
7
+ <% end %>
8
+ <% end %>
9
+
1
10
  <%= render :partial=>'shared/collection_title_header'%>
2
11
 
3
12
  <div id="show-description">
@@ -1,3 +1,7 @@
1
+ <% content_for :atrium_side_bar do %>
2
+ <%= render :partial => 'shared/collection_search_form' %>
3
+ <%= render :partial => 'atrium/collections/navigation' %>
4
+ <% end %>
1
5
  <%- if @atrium_descriptions-%>
2
6
  <%= render :partial=>'shared/list_descriptions', :locals=>{:descriptions=>@atrium_descriptions} %>
3
7
  <%- end -%>
@@ -1,3 +1,6 @@
1
+ <% content_for :atrium_side_bar do %>
2
+ <%= render :partial => 'atrium/collections/edit_navigation' %>
3
+ <% end %>
1
4
  <% if @exhibit %>
2
5
  <%= form_for(@exhibit, :html => {:class => 'atrium'}) do |f| %>
3
6
  <fieldset>
@@ -35,7 +38,11 @@
35
38
  <%= link_to("Set Exhibit Scope", atrium_set_exhibit_scope_path(query_params), :class => 'button').html_safe %>
36
39
  <%= link_to("Remove Exhibit Scope", atrium_unset_exhibit_scope_path(@exhibit[:id]), :class => 'button').html_safe %>
37
40
  </p>
38
-
41
+ <% if exhibit_scoped_to_items?(@exhibit.id) %>
42
+ <p class="warning">
43
+ Please note that exhibit is scoped to few items. Hence items added through facet group below is hidden in browse view.
44
+ </p>
45
+ <% end %>
39
46
  <h3>Group Exhibit Items by Facets</h3>
40
47
  <p>
41
48
  Items present in a exhibit can be further scoped by facet selections. These facets
@@ -0,0 +1,30 @@
1
+ <%= link_to 'View Collection', @atrium_collection if @atrium_collection%>
2
+ <div id="browse-navigation" class="facet-list">
3
+ <% if can_add_view_exhibit? %>
4
+ <% unless @exhibit_navigation_data.nil? || @exhibit_navigation_data.empty? && @exhibit_navigation_data.include?(@exhibit) %>
5
+ <% index = @exhibit_navigation_data.index(@exhibit)%>
6
+ <% exhibit = @exhibit_navigation_data[index]%>
7
+ <%# Recursively render the browse sets. %>
8
+ <h3 class="facet-heading <%= exhibit.pretty_title%>">
9
+ <%= link_to exhibit.pretty_title, exhibit %>
10
+ </h3>
11
+ <% unless exhibit_scoped_to_items?(exhibit.id) %>
12
+ <% unless exhibit.browse_levels.nil? || exhibit.browse_levels.empty? %>
13
+ <%= render :partial => 'shared/navigation_browse_levels',
14
+ :locals=>{
15
+ :exhibit_number => exhibit.set_number,
16
+ :browse_levels => exhibit.browse_levels,
17
+ :browse_facets => exhibit.browse_facet_names,
18
+ :exhibit_id => exhibit[:id]
19
+ }%>
20
+ <% end %>
21
+ <%end %>
22
+ <% end %>
23
+ <% end %>
24
+ <% if can? :edit, Atrium::Showcase %>
25
+ <% if !session[:edit_showcase] && !params[:atrium_collection_browse] && !params[:atrium_exhibit_browse] %>
26
+ <%= link_to "Customize this page", new_atrium_exhibit_showcases_path(@exhibit, :facet_selection => params[:f]), :class => "customize"%>
27
+ <% end %>
28
+ <% end %>
29
+ </div>
30
+
@@ -1,3 +1,11 @@
1
+ <% content_for :atrium_side_bar do %>
2
+ <% if is_editing? %>
3
+ <%= render :partial => 'atrium/showcases/showcase_navigation' %>
4
+ <% else %>
5
+ <%= render :partial => 'shared/collection_search_form' %>
6
+ <%= render :partial => 'navigation' %>
7
+ <% end %>
8
+ <% end %>
1
9
  <h2>
2
10
  <div class="<%= params[:edit_showcase] && (can? :create, Atrium::Exhibit) ? "edit-text": "no-edit"%>" id="div_1" data-column-name="atrium_exhibit[label]" data-update-uri=<%=atrium_exhibit_path(@exhibit)%>>
3
11
  <%= @exhibit.pretty_title %>
@@ -12,7 +20,7 @@
12
20
 
13
21
  <div id="show-selected">
14
22
  <%- if !@featured_documents.blank? && @featured_documents.any? -%>
15
- <%= render :partial=>'shared/featured_sources' %>
23
+ <%= render :partial=>'shared/featured_sources', :locals=>{:showcase_id=>@atrium_showcase.id}%>
16
24
  <%- end -%>
17
25
  </div>
18
26
 
@@ -1 +1 @@
1
- <%= render :partial=>'shared/featured_sources' %>
1
+ <%= render :partial=>'shared/featured_sources', :locals=>{:showcase_id=>@atrium_showcase.id}%>
@@ -1,4 +1,10 @@
1
-
1
+ <% content_for :atrium_side_bar do %>
2
+ <% if (params[:atrium_collection_browse].blank? && params[:atrium_exhibit_browse].blank?) || params[:class] == "edit_collection" %>
3
+ <% if params[:collection_id] %>
4
+ <h3 class="collection-browse-link"><%= link_to "Browse This Collection", atrium_collection_path(params[:collection_id]) %></h3>
5
+ <% end %>
6
+ <% end %>
7
+ <% end %>
2
8
  <% unless has_search_parameters? %>
3
9
  <%# if there are no input/search related params, display the "home" partial -%>
4
10
  <%= render 'home' %>
@@ -45,36 +45,12 @@
45
45
  </div>
46
46
  </div>
47
47
  <div id="sidebar">
48
- <% if params[:controller].eql?( "catalog") %>
49
- <% if (params[:atrium_collection_browse].blank? && params[:atrium_exhibit_browse].blank?) || params[:class] == "edit_collection" %>
50
- <% if params[:collection_id] %>
51
- <h3 class="collection-browse-link"><%= link_to "Browse This Collection", atrium_collection_path(params[:collection_id]) %></h3>
52
- <% end %>
53
- <% else %>
54
- <%= render :partial => 'shared/collection_search_form' %>
55
- <%= render :partial => 'atrium/collections/navigation' %>
56
- <% end %>
57
- <% elsif params[:controller].eql?("atrium/collections") && !(params[:action].eql?("show"))%>
58
- <%= render :partial => 'atrium/collections/edit_navigation' %>
59
- <% elsif params[:controller].eql?("atrium/exhibits") && !(params[:action].eql?("show"))%>
60
- <%= render :partial => 'atrium/collections/edit_navigation' %>
61
- <% elsif params[:controller].eql?("atrium/exhibits") && params[:action].eql?("show") && session[:edit_showcase]%>
62
- <%= render :partial => 'atrium/showcases/showcase_navigation' %>
63
- <% elsif params[:controller].eql?("atrium/collections") && params[:action].eql?("show") && session[:edit_showcase]%>
64
- <%= render :partial => 'atrium/showcases/showcase_navigation' %>
65
- <% elsif params[:controller].eql?("atrium/collections") && params[:action].eql?("show")%>
66
- <%= render :partial => 'shared/collection_search_form' %>
67
- <%= render :partial => 'atrium/collections/navigation' %>
68
- <% elsif params[:controller].eql?("atrium/descriptions") && params[:action].eql?("index")%>
69
- <%= render :partial => 'shared/collection_search_form' %>
70
- <%= render :partial => 'atrium/collections/navigation' %>
71
- <% elsif params[:controller].eql?("atrium/descriptions") && !(params[:action].eql?("index"))%>
72
- <% elsif params[:controller] != "user_sessions" && !(params[:controller] == "atrium/collections" && params[:action] == "index")%>
73
- <%= render :partial => 'shared/collection_search_form' %>
74
- <%= render :partial => 'atrium/collections/navigation' %>
48
+ <% if content_for? :atrium_side_bar %>
49
+ <%= yield :atrium_side_bar %>
75
50
  <% end %>
76
51
  <%= sidebar_items.join('').html_safe %>
77
52
  </div>
53
+ <%= emission_items.join('').html_safe %>
78
54
  </div>
79
55
  <div id="ft">
80
56
  <%= yield :footer %>
@@ -5,7 +5,7 @@
5
5
  <h3 class="search"><label for="q"><%= link_to("Search Complete Collection", atrium_collection_home_path(collection_id)) %></label></h3>
6
6
  <%= text_field_tag :q, params[:q], :class => "q" %>
7
7
  <%= hidden_field_tag :collection_id, collection_id%>
8
- <%= search_as_hidden_fields(:omit_keys => [:q, :f, :search_field, :qt, :action, :id, :controller, :class]).html_safe %>
8
+ <%= search_as_hidden_fields(:omit_keys => [:q, :f, :search_field, :qt, :action, :id, :controller, :class, :atrium_exhibit_browse, :atrium_collection_browse]).html_safe %>
9
9
  <%= submit_tag 'Search', :class=>'submit' %>
10
10
  </fieldset>
11
11
  <% end %>
@@ -14,6 +14,9 @@
14
14
  </div>
15
15
  </div>
16
16
  <%= render_document_partial document, :index %>
17
+ <% if is_editing? && (can? :create, Atrium::Showcase)%>
18
+ <a class="remove_featured button" href=# action="<%= atrium_showcase_remove_featured_path(showcase_id, :solr_doc_id=>document[:id])%>" title="Remove this featured item">Remove this item</a>
19
+ <% end %>
17
20
  </div>
18
21
  <% end %>
19
22
  <%- end -%>
@@ -1,4 +1,3 @@
1
-
2
1
  <% descriptions.each do |desc| %>
3
2
  <%- title= desc.pretty_title %>
4
3
  <% if !desc.nil? && !is_editing?%>
@@ -14,7 +13,8 @@
14
13
  <% else %>
15
14
  <h3><%=title%></h3>
16
15
  <%- content= desc.description_solr_id.blank? ? desc.get_essay : get_essay_from_description(@description_hash,desc.description_solr_id)%>
17
- <blockquote class="intro"><%= truncate( content, :length =>550, :ommision => "....").html_safe%></blockquote>
16
+ <%if content %>
17
+ <blockquote class="intro"><%= truncate( content, :length =>550, :ommision => "....").html_safe%></blockquote>
18
18
  <% if content.length>50 %>
19
19
  <a class="heading" href="#">[Read the complete essay]</a>
20
20
  <div style="display: none"class="content" id="<%= desc[:id] %>">
@@ -22,6 +22,7 @@
22
22
  </div>
23
23
  <% end %>
24
24
  <% end %>
25
+ <% end %>
25
26
  <% elsif is_editing?%>
26
27
  <%# need to add dl tag for animated JS to work %>
27
28
  <dl>
@@ -10,8 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["hydra-tech@googlegroups.com"]
11
11
  s.homepage = "https://github.com/ndlib/atrium"
12
12
  s.summary = %q{Atrium Rails Engine (requires Rails 3)}
13
- s.description = %q{This is an ALPHA release -- you have been warned. It will get much better soon. Atrium is a Rails Engine for for creating collections in either a Blacklight or Hydra context. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora, solrizer, and om. The first use of the atrium name for a gem was by Hiten Parmar: https://github.com/hrp/atrium}
14
-
13
+ s.description = %q{Atrium is a Rails Engine for for creating collections in either a Blacklight or Hydra context. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora, solrizer, and om. The first use of the atrium name for a gem was by Hiten Parmar: https://github.com/hrp/atrium}
15
14
 
16
15
  s.add_dependency 'rails', '~> 3.1'
17
16
  s.add_dependency 'blacklight', '~> 3.3'
@@ -66,8 +65,7 @@ Gem::Specification.new do |s|
66
65
  s.add_development_dependency 'rspec-given'
67
66
  s.add_development_dependency 'guard'
68
67
  s.add_development_dependency 'guard-rspec'
69
- s.add_development_dependency 'ruby_gntp' if RUBY_PLATFORM =~ /darwin/
70
-
68
+ s.add_development_dependency 'ruby_gntp' if RUBY_PLATFORM =~ /[darwin|linux]/
71
69
 
72
70
  s.files = `git ls-files`.split("\n")
73
71
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")