Commit 02104c9f1bb19f2456b2e5e7ed4431dfef5c3797
1 parent
6224c171
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
proposals_discussion: small fixes
Showing
5 changed files
with
17 additions
and
6 deletions
Show diff stats
plugins/proposals_discussion/lib/proposals_discussion_plugin/proposals_list_helper.rb
0 → 100644
@@ -0,0 +1,7 @@ | @@ -0,0 +1,7 @@ | ||
1 | +module ProposalsDiscussionPlugin::ProposalsListHelper | ||
2 | + | ||
3 | + def more_proposals(text, holder, order, page=1) | ||
4 | + link_to '', url_for({:controller => 'proposals_discussion_plugin_public', :action => 'load_proposals', :holder_id => holder.id, :profile => profile.identifier, :order => order, :page => page }) | ||
5 | + end | ||
6 | + | ||
7 | +end |
plugins/proposals_discussion/public/style.css
@@ -117,6 +117,7 @@ form .proposals-discussion-plugin .body textarea { | @@ -117,6 +117,7 @@ form .proposals-discussion-plugin .body textarea { | ||
117 | text-decoration: none; | 117 | text-decoration: none; |
118 | border-left: 1px solid rgb(185, 185, 185); | 118 | border-left: 1px solid rgb(185, 185, 185); |
119 | padding: 0 5px; | 119 | padding: 0 5px; |
120 | + color: #555753; | ||
120 | } | 121 | } |
121 | .proposals_list .filters a.selected { | 122 | .proposals_list .filters a.selected { |
122 | font-weight: bold; | 123 | font-weight: bold; |
plugins/proposals_discussion/views/content_viewer/_proposals_list.html.erb
@@ -18,9 +18,10 @@ | @@ -18,9 +18,10 @@ | ||
18 | proposalsScroll(); | 18 | proposalsScroll(); |
19 | }); | 19 | }); |
20 | }); | 20 | }); |
21 | - | ||
22 | </script> | 21 | </script> |
23 | 22 | ||
23 | +<% extend ProposalsDiscussionPlugin::ProposalsListHelper %> | ||
24 | + | ||
24 | <% private_proposals = user ? @page.proposals.private(user) : [] %> | 25 | <% private_proposals = user ? @page.proposals.private(user) : [] %> |
25 | <% unless private_proposals.empty? %> | 26 | <% unless private_proposals.empty? %> |
26 | <div class="private-proposals"> | 27 | <div class="private-proposals"> |
@@ -33,8 +34,8 @@ | @@ -33,8 +34,8 @@ | ||
33 | <div class="proposals_list"> | 34 | <div class="proposals_list"> |
34 | <h5><%= _('Proposals') %></h5> | 35 | <h5><%= _('Proposals') %></h5> |
35 | <div class="filters"> | 36 | <div class="filters"> |
36 | - <% [[_('Random'), :random], [_('Aplhabetical'), :alphabetical]].each do |order| %> | ||
37 | - <%= link_to order.first, url_for({:controller => 'proposals_discussion_plugin_public', :action => 'load_proposals', :holder_id => holder.id, :profile => profile.identifier, :order => order.second}), :remote => true, :class => 'order' %> | 37 | + <% [[_('Random'), :random], [_('Aplhabetical'), :alphabetical]].each_with_index do |order, i| %> |
38 | + <%= link_to order.first, url_for({:controller => 'proposals_discussion_plugin_public', :action => 'load_proposals', :holder_id => holder.id, :profile => profile.identifier, :order => order.second}), :remote => true, :class => "order #{order.second} #{i==0 ? 'selected':''}" %> | ||
38 | <% end %> | 39 | <% end %> |
39 | </div> | 40 | </div> |
40 | <div class="clear"></div> | 41 | <div class="clear"></div> |
@@ -42,7 +43,7 @@ | @@ -42,7 +43,7 @@ | ||
42 | <div class="proposals"> | 43 | <div class="proposals"> |
43 | <div class="more"> | 44 | <div class="more"> |
44 | <img src="/images/loading.gif" alt="Loading" /><%= _("Loading...") %> | 45 | <img src="/images/loading.gif" alt="Loading" /><%= _("Loading...") %> |
45 | - <%= link_to '', url_for({:controller => 'proposals_discussion_plugin_public', :action => 'load_proposals', :holder_id => holder.id, :profile => profile.identifier, :order => order }) %> | 46 | + <%= more_proposals('', holder, order) %> |
46 | </div> | 47 | </div> |
47 | </div> | 48 | </div> |
48 | </div> | 49 | </div> |
plugins/proposals_discussion/views/content_viewer/_proposals_list_content.html.erb
1 | <%= render :partial => 'content_viewer/proposal_card', :collection => proposals %> | 1 | <%= render :partial => 'content_viewer/proposal_card', :collection => proposals %> |
2 | 2 | ||
3 | +<% extend ProposalsDiscussionPlugin::ProposalsListHelper %> | ||
4 | + | ||
3 | <div class="more"> | 5 | <div class="more"> |
4 | - <%= link_to _('More'), url_for({:controller => 'proposals_discussion_plugin_public', :action => 'load_proposals', :holder_id => holder.id, :profile => profile.identifier, :page => page, :order => order }) %> | 6 | + <%= more_proposals(_('More'), holder, order, page) %> |
5 | </div> | 7 | </div> |
plugins/proposals_discussion/views/content_viewer/proposal.html.erb
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | 20 | ||
21 | <% if @page.allow_edit?(user) && !@page.published %> | 21 | <% if @page.allow_edit?(user) && !@page.published %> |
22 | <div class="actions"> | 22 | <div class="actions"> |
23 | - <%= link_to url_for({:controller => 'proposals_discussion_plugin_myprofile', :action => 'publish_proposal', :proposal_id => @page.id}), :class => 'button with-text icon-add' do %> | 23 | + <%= link_to url_for({:controller => 'proposals_discussion_plugin_myprofile', :action => 'publish_proposal', :proposal_id => @page.id}), :class => 'button with-text icon-suggest' do %> |
24 | <strong><%= _("Publish") %></strong> | 24 | <strong><%= _("Publish") %></strong> |
25 | <% end %> | 25 | <% end %> |
26 | </div> | 26 | </div> |