[issue #64] Added search through wiki
This commit is contained in:
parent
65e659ad49
commit
538e3da8c8
|
@ -2,11 +2,20 @@
|
|||
- if @results and !@results.empty?
|
||||
%ul
|
||||
- @results.each do |result|
|
||||
%li= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
|
||||
%li
|
||||
- if action_name == 'search'
|
||||
= link_to result[:name], project_wiki_path(@project, CGI.escape(result[:name]))
|
||||
%span.count= "(#{result.count} #{t("layout.wiki.matches")})"
|
||||
-else
|
||||
= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
|
||||
- else
|
||||
%p#no-results
|
||||
= t("layout.wiki.no_pages_in")
|
||||
%strong= @ref
|
||||
- @st_ref = capture do
|
||||
%strong= @ref || @query
|
||||
- if action_name == 'search'
|
||||
= raw t("layout.wiki.no_results_for_search", :query => @st_ref)
|
||||
- else
|
||||
= raw t("layout.wiki.no_pages_in", :ref => @st_ref)
|
||||
|
||||
#footer
|
||||
%ul.actions
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
.inner
|
||||
#wiki-wrapper.results
|
||||
#head
|
||||
%h1.title= "#{t("layout.wiki.all_pages_in")} #{@ref}"
|
||||
%h1.title= t("layout.wiki.all_pages_in", :ref => @ref)
|
||||
%ul.actions
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.home"), project_wiki_index_path(@project),
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
= render :partial => 'gollum_includes'
|
||||
= render :partial => 'project_short'
|
||||
|
||||
%a{ :name => "wiki"}
|
||||
.block
|
||||
.secondary-navigation
|
||||
%ul.wat-cf
|
||||
%li.first= link_to t("layout.wiki.home"), project_wiki_index_path(@project)
|
||||
%li= link_to t("layout.wiki.pages"), pages_project_wiki_index_path(@project)
|
||||
%li= link_to t("layout.wiki.wiki_history"), '#'
|
||||
%li= link_to t("layout.wiki.git_access"), '#'
|
||||
|
||||
.content
|
||||
.inner
|
||||
#wiki-wrapper.results
|
||||
#head
|
||||
%h1.title= t("layout.wiki.search_results_for", :query => @query)
|
||||
%ul.actions
|
||||
%li.minibutton
|
||||
= link_to t("layout.wiki.home"), project_wiki_index_path(@project),
|
||||
:class => 'action-edit-page'
|
||||
= render :partial => 'searchbar'
|
||||
|
||||
= render :partial => "results"
|
||||
|
||||
- content_for :sidebar do
|
||||
- render :partial => 'projects/sidebar'
|
|
@ -182,7 +182,11 @@ ru:
|
|||
view_commit: Показать версию
|
||||
compare_revisions: Сравнить версии
|
||||
back_to_top: Наверх
|
||||
all_pages_in: Все страницы в
|
||||
all_pages_in: "Все страницы в %{ref}:"
|
||||
search_results_for: "Результаты поиска для %{query}:"
|
||||
no_pages_in: В %{ref} нет страниц для отображения.
|
||||
no_results_for_search: По запросу %{query} ничего не найдено.
|
||||
matches: Совпадений
|
||||
|
||||
roles:
|
||||
confirm_delete: Вы уверены, что хотите удалить эту роль?
|
||||
|
|
Loading…
Reference in New Issue