From 2af0135fb550cefb52a51483a72fa7da8184789f Mon Sep 17 00:00:00 2001 From: George Vinogradov Date: Wed, 18 Jan 2012 19:06:58 +0400 Subject: [PATCH] [issue #64] Added All Pages representation. --- app/views/wiki/_results.html.haml | 13 +++++++ app/views/wiki/pages.html.haml | 54 ++++++++++++++++++++++++++++ config/locales/ru.yml | 1 + public/stylesheets/gollum/gollum.css | 1 + 4 files changed, 69 insertions(+) create mode 100644 app/views/wiki/_results.html.haml create mode 100644 app/views/wiki/pages.html.haml diff --git a/app/views/wiki/_results.html.haml b/app/views/wiki/_results.html.haml new file mode 100644 index 000000000..a56699ecc --- /dev/null +++ b/app/views/wiki/_results.html.haml @@ -0,0 +1,13 @@ +#results + - if @results and !@results.empty? + %ul + - @results.each do |result| + %li= link_to result.name, project_wiki_path(@project, CGI.escape(result.name)) + - else + %p#no-results + = t("layout.wiki.no_pages_in") + %strong= @ref + +#footer + %ul.actions + %li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki' diff --git a/app/views/wiki/pages.html.haml b/app/views/wiki/pages.html.haml new file mode 100644 index 000000000..d62aa57d3 --- /dev/null +++ b/app/views/wiki/pages.html.haml @@ -0,0 +1,54 @@ +- content_for :javascripts do + = javascript_include_tag 'gollum/gollum.js', 'gollum/gollum.dialog.js', 'gollum/gollum.placeholder.js' + +- content_for :stylesheets do + = stylesheet_link_tag 'gollum/gollum.css', 'gollum/dialog.css', 'gollum/ie7.css', 'gollum/template.css' + +.block + .secondary-navigation + %ul.wat-cf + %li.first= link_to t("layout.projects.list"), projects_path + %li= link_to t("layout.projects.new"), new_project_path + %li.active= link_to t("layout.projects.show"), project_path(@project) + %li= link_to t("layout.git.repositories.source"), project_repo_path(@project) + %li= link_to t("layout.projects.build"), new_project_build_list_path(@project) + %li= link_to t("layout.projects.issues"), project_issues_path(@project) + + .content + .inner + %p + %b + = t("activerecord.attributes.project.name") + \: + = @project.name + %p + %b + = t("activerecord.attributes.project.owner") + \: + = link_to @project.owner.try(:name), url_for(@project.owner) + +%a{ :name => "wiki"} +.block + .secondary-navigation + %ul.wat-cf + %li.first{:class => "#{(@name == 'Home') ? 'active' : ''}" } + = link_to t("layout.wiki.home"), project_wiki_index_path(@project) + %li.active= 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.all_pages_in")} #{@ref}" + %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' diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 52b8696e0..3401e81e2 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -182,6 +182,7 @@ ru: view_commit: Показать версию compare_revisions: Сравнить версии back_to_top: Наверх + all_pages_in: Все страницы в roles: confirm_delete: Вы уверены, что хотите удалить эту роль? diff --git a/public/stylesheets/gollum/gollum.css b/public/stylesheets/gollum/gollum.css index 4d846adb2..2ca8af025 100755 --- a/public/stylesheets/gollum/gollum.css +++ b/public/stylesheets/gollum/gollum.css @@ -372,6 +372,7 @@ .results #results ul { margin: 2em 0 0 0; padding: 0; + padding-left: 25px; } .results #results ul li {