From b0370b850671ed87bb57b31678977c10989eb07a Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 7 Jun 2008 21:53:20 +0000 Subject: [PATCH] ActionItem265: finishing touches in map stuff --- app/views/search/_directory.rhtml | 4 ++-- app/views/search/_search_form.rhtml | 2 ++ app/views/search/people.rhtml | 11 +++++++++-- po/pt_BR/noosfero.po | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/views/search/_directory.rhtml b/app/views/search/_directory.rhtml index 04c7eb4..7c372fc 100644 --- a/app/views/search/_directory.rhtml +++ b/app/views/search/_directory.rhtml @@ -1,6 +1,6 @@
- <%= link_to_unless_current(_('Recent'), :action => 'assets') %> + <%= link_to_unless(params[:initial].blank?, _('Recent'), :action => 'assets', :display => params[:display]) %>   - <%= (?a..?z).map { |initial| link_to_unless_current(('' << initial).upcase, :action => 'directory', :asset => @asset, :initial => ('' << initial)) }.join('   ') %> + <%= (?a..?z).map { |initial| link_to_unless(params[:initial] == ('' << initial), ('' << initial).upcase, :action => 'directory', :asset => @asset, :initial => ('' << initial), :display => params[:display]) }.join('   ') %>

diff --git a/app/views/search/_search_form.rhtml b/app/views/search/_search_form.rhtml index 6dc97e8..d611bb3 100644 --- a/app/views/search/_search_form.rhtml +++ b/app/views/search/_search_form.rhtml @@ -6,6 +6,8 @@ :method => 'get', :class => 'search_form' ) do %> <%= '

%s

' % form_title if defined? form_title %> + <%= hidden_field_tag :display, params[:display] %> +
<%= text_field_tag 'query', @query, :id => ( lightbox? ? 'popup-search-input' : '' ), :size => 50 %> diff --git a/app/views/search/people.rhtml b/app/views/search/people.rhtml index 7952fb5..97318a5 100644 --- a/app/views/search/people.rhtml +++ b/app/views/search/people.rhtml @@ -1,10 +1,17 @@ <% if @query.blank? %> -

<%= @asset_name %>

+

+ <%= @asset_name %> + <% if params[:initial] %> + <%= '(%s)' % params[:initial].upcase %> + <% else %> + <%= _('(recently added)') %> + <% end %> +

<%= render :partial => 'directory' %> <% else %>

<%= @asset_name %>: <%= h(@category ? (_('Search results for "%{query}" in "%{category}"') % { :query => @query, :category => @category.name}) : (_('Search results for "%s"') % @query)) %>

- <%= link_to _('Browse by name'), :action => 'index', :asset => 'people' %> + <%= link_to _('Browse by name'), :action => 'assets', :asset => @results.first.first %>
<% end %> diff --git a/po/pt_BR/noosfero.po b/po/pt_BR/noosfero.po index 4376623..1191264 100644 --- a/po/pt_BR/noosfero.po +++ b/po/pt_BR/noosfero.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: noosfero 0.10.0\n" "POT-Creation-Date: 2008-06-07 13:47-0300\n" -"PO-Revision-Date: 2008-06-07 13:47-0300\n" +"PO-Revision-Date: 2008-06-07 18:36-0300\n" "Last-Translator: Joenio Costa \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -2635,7 +2635,7 @@ msgstr "Navegar por nome" #: app/views/search/_directory.rhtml:2 msgid "Recent" -msgstr "Recente" +msgstr "Recentes" #: app/views/search/_display_results.rhtml:18 msgid "(more ...)" -- libgit2 0.21.2