app/views/elt/show.rhtml in parlement-0.8 vs app/views/elt/show.rhtml in parlement-0.9

- old
+ new

@@ -1,44 +1,43 @@ <% voters = Choice.count :select => 'person_id', :distinct => true %> <div class="sidebar"> + <h3 class="boxTitle">Identity</h3> + <div class="box" id="identity"> + <div id="author_<%= @elt.id %>"> + <%= render :partial => 'account/show', :locals => { :divId => 'author_'+@elt.id } %> + </div> + </div> + <h3 class="boxTitle">Filter</h3> <div class="box"> <div>All voters: <span class="result"><%= voters %></span></div> <form id="filterForm" name="filterForm"> <a onclick="return decrementFilter()" href="#" accesskey="<">&lt;</a> <select id="filter" name="filter" onchange="setFilter(this.options[this.selectedIndex].value)"> - <option value="-<%= voters %>"></option> - <option selected="selected">0</option> - <% (1..voters).each { |v| %> <option><%= v %></option> <% } %> + <%= options_for_select [["", -voters]] %> + <%= options_for_select (0..(voters)), 0 %> </select> <a onclick="return incrementFilter()" href="#" accesskey=">">&gt;</a> <%= submit_tag 'Ok' %> </form> <script>setFilterFromCookie();</script> </div> - <h3 class="boxTitle">Identity</h3> - <div class="box" id="identity"> - <div id="author_<%= @elt.id %>"> - <%= render :partial => 'account/show', :locals => { :divId => 'author_'+@elt.id } %> - </div> - </div> - <h3 class="boxTitle">Highest posts</h3> <div class="box listByVote"> <%= render :partial => '/elt/listByVote' %> </div> <h3 class="boxTitle">Latest posts</h3> <div class="box listByDate"> <%= render :partial => '/elt/listByDate' %> </div> - <h3 class="boxTitle">Subscribe</h3> + <h3 class="boxTitle">Subscribers</h3> <div class="box"> - <div id="subscription"> + <div id="subscription" <%= "style='display: none'" unless session[:person] %> > <%= link_to_remote(((@session[:person] and @elt.subscribers.include?(@session[:person])) ? 'Unsubscribe!' : 'Subscribe!'), :update => 'subscription', :url => { :controller => 'subscriber', :action => 'subscribe', :id => @elt }, :loaded => visual_effect(:BlindDown, 'subscription')) %> </div> @@ -52,9 +51,19 @@ <div class="boxLineR"> <% @elt.parent.all_recipients.each do |i| %> <%= link_to(i.name, :controller => 'person', :action => 'show', :id => i) %> <% end %> </div> + </div> + + <h3 class="boxTitle">Search</h3> + <div class="box"> + <form action="http://google.com/search"> + <input type="hidden" name="q" + value="site:<%= ActionMailer::Base.server_settings[:domain] %>"/> + <input type="text" name="q"/> + <%= submit_tag 'OK' %> + </form> </div> </div> <% @flash.each do |key, value| %> <div class="<%= key %>"><%= value %></div>