Refactor, fix and cleanup wiki templates and translations. Refs #193

This commit is contained in:
Pavel Chipiga 2012-02-24 23:37:22 +02:00
parent 3c83649627
commit 4d2459c60c
28 changed files with 293 additions and 491 deletions

View File

@ -1,20 +0,0 @@
// Disable checkboxes selection for history table for more than 2 versions:
//$(document).ready(function() {
if ('.wiki .history') {
$('.niceCheck-main').click(function() {
var count = 0;
$('input.history_cbx').each(function(i,el) {
if ($(el).attr('checked')) {
count = count + 1;
}
});
if (count > 2) {
var cbx = $( $(this).find('input.history_cbx')[0] );
if ( cbx.attr('checked') ) {
$(this).css('background-position', '0pt 0px');
cbx.removeAttr('checked');
}
}
});
}
//});

View File

@ -5,13 +5,13 @@
= text_area_tag :content, @blob.data.encode_to_default, :id => "gollum-editor-body"
#gollum-editor-edit-summary.singleline
= label_tag :message, t("layout.wiki.edit_commit_message"), :class => "jaws"
= text_field_tag :message, t("layout.wiki.commit_message_placeholder"), :id => "editor-commit-message-field"
= label_tag :message, t("wiki.edit_commit_message"), :class => "jaws"
= text_field_tag :message, t("wiki.commit_message_placeholder"), :id => "editor-commit-message-field"
%span.jaws
%br
= submit_tag t("layout.wiki.save_button"), :id => "gollum-editor-submit", :title => t("layout.wiki.save_changes")
= submit_tag t("wiki.save_button"), :id => "gollum-editor-submit", :title => t("wiki.save_changes")
= link_to t("layout.cancel"), blob_file_path, :class => 'minibutton', :id => 'gollum-editor-preview'
:javascript

View File

@ -1,9 +1,8 @@
- revert_button = capture do
= link_to t("layout.wiki.revert_page#{action_name == 'revert' ? '' : 's'}"), '#', :class => "gollum-revert-button button width100"
= link_to t("wiki.revert_page#{action_name == 'revert' ? '' : 's'}"), '#', :class => "gollum-revert-button button width100"
- if action_name != 'revert'
= form_tag revert_path(@project, @versions[0][0..6], @versions[1][0..6], @name),
:name => "gollum-revert", :id => "gollum-revert-form" do
= form_tag revert_path(@project, @versions[0][0..6], @versions[1][0..6], @name), :name => "gollum-revert", :id => "gollum-revert-form" do
= revert_button if can? :write, @project
%br
@ -21,4 +20,4 @@
%br
%br
= link_to t("layout.wiki.back_to_top"), '#wiki'
= link_to t("wiki.back_to_top"), '#wiki'

View File

@ -1,6 +1 @@
-#.blob_header
-# .size= h(diff.deleted_file ? diff.a_path : diff.b_path)
-# .clear
.diff_data.highlight
= render_diff(diff)
.diff_data.highlight= render_diff(diff)

View File

@ -3,44 +3,41 @@
%fieldset#gollum-editor-fields
- if @new
#gollum-editor-title-field.singleline
= label_tag :page, t("layout.wiki.page_title"), :class => 'jaws'
= label_tag :page, t("wiki.page_title"), :class => 'jaws'
= text_field_tag :page, @name, :id => "gollum-editor-page-title"
- else
= hidden_field_tag :page, @name, :id => "gollum-editor-page-title"
= render :partial => 'editor_toolbar'
= render 'editor_toolbar'
= text_area_tag :content, @content, :id => "gollum-editor-body", :'data-markup-lang' => format
- if has_footer?
#gollum-editor-edit-footer.collapsed
= link_to "#", :class => "button" do
%span= t("layout.wiki.expand_collapse")
%h4
Footer
%span= t("wiki.expand_collapse")
%h4= t("wiki.footer")
= text_area_tag :footer, footer.text_data
- if has_sidebar?
#gollum-editor-edit-sidebar.collapsed
= link_to "#", :class => "button" do
%span= t("layout.wiki.expand_collapse")
%h4
Sidebar
%span= t("wiki.expand_collapse")
%h4= t("wiki.sidebar")
= text_area_tag :sidebar, sidebar.text_data
#gollum-editor-edit-summary.singleline
= label_tag :message, t("layout.wiki.edit_commit_message"), :class => "jaws"
= text_field_tag :message, t("layout.wiki.commit_message_placeholder"), :id => "gollum-editor-message-field"
= label_tag :message, t("wiki.edit_commit_message"), :class => "jaws"
= text_field_tag :message, t("wiki.commit_message_placeholder"), :id => "gollum-editor-message-field"
%span.jaws
%br
= submit_tag t("layout.wiki.save_button"), :id => "gollum-editor-submit", :title => t("layout.wiki.save_changes")
= link_to t("layout.wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview",
:class => "minibutton", :title => t("layout.wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
= submit_tag t("wiki.save_button"), :id => "gollum-editor-submit", :title => t("wiki.save_changes")
= link_to t("wiki.preview"), "javascript:void(0)", :id => "gollum-editor-preview", :class => "minibutton", :title => t("wiki.preview_title"), :'data-url' => preview_project_wiki_index_path(@project)
-# - content_for :javascripts do
-# = javascript_include_tag 'gollum/editor/gollum.editor.js'
-#
-# - content_for :stylesheets do
-# = stylesheet_link_tag 'gollum/editor.css'
/ - content_for :javascripts do
/ = javascript_include_tag 'gollum/editor/gollum.editor.js'
/
/ - content_for :stylesheets do
/ = stylesheet_link_tag 'gollum/editor.css'

View File

@ -1,51 +1,48 @@
#gollum-editor-function-bar
#gollum-editor-function-buttons
= link_to "#", :id => "function-bold", :class => "function-button", :title => t("layout.wiki.editor.bold") do
%span= t("layout.wiki.editor.bold")
= link_to "#", :id => "function-italic", :class => "function-button", :title => t("layout.wiki.editor.italic") do
%span= t("layout.wiki.editor.italic")
= link_to "#", :id => "function-code", :class => "function-button", :title => t("layout.wiki.editor.code") do
%span= t("layout.wiki.editor.code")
= link_to "#", :id => "function-bold", :class => "function-button", :title => t("wiki.editor.bold") do
%span= t("wiki.editor.bold")
= link_to "#", :id => "function-italic", :class => "function-button", :title => t("wiki.editor.italic") do
%span= t("wiki.editor.italic")
= link_to "#", :id => "function-code", :class => "function-button", :title => t("wiki.editor.code") do
%span= t("wiki.editor.code")
%span.function-divider
 
%span.function-divider  
= link_to "#", :id => "function-ul", :class => "function-button", :title => t("layout.wiki.editor.unordered_list") do
%span= t("layout.wiki.editor.unordered_list")
= link_to "#", :id => "function-ol", :class => "function-button", :title => t("layout.wiki.editor.ordered_list") do
%span= t("layout.wiki.editor.ordered_list")
= link_to "#", :id => "function-blockquote", :class => "function-button", :title => t("layout.wiki.editor.blockquote") do
%span= t("layout.wiki.editor.blockquote")
= link_to "#", :id => "function-hr", :class => "function-button", :title => t("layout.wiki.editor.horizontal_rule") do
%span= t("layout.wiki.editor.horizontal_rule")
= link_to "#", :id => "function-ul", :class => "function-button", :title => t("wiki.editor.unordered_list") do
%span= t("wiki.editor.unordered_list")
= link_to "#", :id => "function-ol", :class => "function-button", :title => t("wiki.editor.ordered_list") do
%span= t("wiki.editor.ordered_list")
= link_to "#", :id => "function-blockquote", :class => "function-button", :title => t("wiki.editor.blockquote") do
%span= t("wiki.editor.blockquote")
= link_to "#", :id => "function-hr", :class => "function-button", :title => t("wiki.editor.horizontal_rule") do
%span= t("wiki.editor.horizontal_rule")
%span.function-divider
 
%span.function-divider  
= link_to "#", :id => "function-h1", :class => "function-button", :title => t("layout.wiki.editor.h1") do
%span= t("layout.wiki.editor.h1")
= link_to "#", :id => "function-h2", :class => "function-button", :title => t("layout.wiki.editor.h2") do
%span= t("layout.wiki.editor.h2")
= link_to "#", :id => "function-h3", :class => "function-button", :title => t("layout.wiki.editor.h3") do
%span= t("layout.wiki.editor.h3")
= link_to "#", :id => "function-h1", :class => "function-button", :title => t("wiki.editor.h1") do
%span= t("wiki.editor.h1")
= link_to "#", :id => "function-h2", :class => "function-button", :title => t("wiki.editor.h2") do
%span= t("wiki.editor.h2")
= link_to "#", :id => "function-h3", :class => "function-button", :title => t("wiki.editor.h3") do
%span= t("wiki.editor.h3")
%span.function-divider
 
%span.function-divider  
= link_to "#", :id => "function-link", :class => "function-button", :title => t("layout.wiki.editor.link") do
%span= t("layout.wiki.editor.link")
= link_to "#", :id => "function-image", :class => "function-button", :title => t("layout.wiki.editor.image") do
%span= t("layout.wiki.editor.image")
= link_to "#", :id => "function-link", :class => "function-button", :title => t("wiki.editor.link") do
%span= t("wiki.editor.link")
= link_to "#", :id => "function-image", :class => "function-button", :title => t("wiki.editor.image") do
%span= t("wiki.editor.image")
%span.function-divider
 
%span.function-divider  
= link_to "#", :id => "function-help", :class => "function-button", :title => t("layout.wiki.editor.help") do
%span= t("layout.wiki.editor.help")
= link_to "#", :id => "function-help", :class => "function-button", :title => t("wiki.editor.help") do
%span= t("wiki.editor.help")
#gollum-editor-format-selector
= select_tag :format, options_for_select(wiki_formats, format), :id => "wiki_format"
= label_tag :format, t("layout.wiki.editor.format")
= label_tag :format, t("wiki.editor.format")
#gollum-editor-help.jaws
%ul#gollum-editor-help-parent
%li= link_to "help_1", "javascript:void(0);", :class => "selected"
@ -62,4 +59,3 @@
#gollum-editor-help-wrapper
#gollum-editor-help-content
%p

View File

@ -1,6 +1,5 @@
.name
= link_to t("layout.wiki.clones.http"), git_repo_url(@project.wiki_repo_name),
:'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
= link_to t("wiki.clones.http"), git_repo_url(@project.wiki_repo_name), :'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
#url-field{:style => 'display: inline'}
.role

View File

@ -1,16 +1,11 @@
%p
Your wiki data can be cloned from a git repository for offline access.
You have several options for editing it at this point:
%br/
Your wiki data can be cloned from a git repository for offline access. You have several options for editing it at this point:
%br
%ol
%li
With your favorite text editor or IDE.
%li With your favorite text editor or IDE.
%li
With the built-in web interface, included with the
= link_to 'Gollum', "https://github.com/github/gollum"
Ruby API.
%li
With the Gollum Ruby API.
When you're done, you can simply push your changes back to our system to
see them reflected on the site. The wiki repositories obey the same
access rules as the source repository that they belong to.
%li With the Gollum Ruby API.
When you're done, you can simply push your changes back to our system to see them reflected on the site. The wiki repositories obey the same access rules as the source repository that they belong to.

View File

@ -1,17 +1,11 @@
%p
Все данные вашей Wiki могут быть клонированы из Git-репозитория для
доступа без интернета. В этом случае вы можете редактировать страницы
следующими способами:
%br/
Все данные вашей Wiki могут быть клонированы из Git-репозитория для доступа без интернета. В этом случае вы можете редактировать страницы следующими способами:
%br
%ol
%li
Вашим любимым текстовым редактором или IDE.
%li Вашим любимым текстовым редактором или IDE.
%li
С помощью встроенного Web-интерфейса, включенного в
= link_to 'Gollum', "https://github.com/github/gollum"
Ruby API.
%li
С помощью Gollum Ruby API.
Когда изменения будут завершены, просто запуште их обратно в нашу систему
чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми
же правами, что и к проекту, с которым она связана.
%li С помощью Gollum Ruby API.
Когда изменения будут завершены, просто запуште их обратно в нашу систему чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми же правами, что и к проекту, с которым она связана.

View File

@ -4,16 +4,14 @@
%tr.history
%td.td1
%span#niceCheckbox1.niceCheck-main{:onclick => "changeCheck(this)"}
=# check_box_tag "versions[]", v.id, :html => {:class => 'history_cbx'}
/ = check_box_tag "versions[]", v.id, :html => {:class => 'history_cbx'}
%input{:type => 'checkbox', :id => 'versions_', :name => 'versions[]', :value => v.id, :class => 'history_cbx'}
%td.td2
- user = User.where(:email => v.author.email).first
.avatar
%a{:href => "#"}
= link_to user_path_by_user(user) do
%img{:src => gravatar_url(v.author.email),
:alt => "avatar: #{v.author.name.encode_to_default}",
:class => "mini-gravatar"}
%img.mini-gravatar{:src => gravatar_url(v.author.email), :alt => "avatar: #{v.author.name.encode_to_default}"}
%span.username= user.present? ? user.uname : v.author.name.encode_to_default
.name
.both
@ -21,8 +19,23 @@
%span.wiki-gray= "#{l v.committed_date.to_date, :format => :long}:"
= v.message.encode_to_default
- if @name
= raw "[#{link_to v.id[0..6], versioned_project_wiki_path(@project, escaped_name, v.id), :title => t("layout.wiki.view_commit")}]"
= raw "[#{link_to v.id[0..6], versioned_project_wiki_path(@project, escaped_name, v.id), :title => t("wiki.view_commit")}]"
- else
= "[#{v.id[0..6]}]"
= javascript_include_tag 'wiki_history'
:javascript
$('.niceCheck-main').click(function() {
var count = 0;
$('input.history_cbx').each(function(i,el) {
if ($(el).attr('checked')) {
count = count + 1;
}
});
if (count > 2) {
var cbx = $( $(this).find('input.history_cbx')[0] );
if ( cbx.attr('checked') ) {
$(this).css('background-position', '0pt 0px');
cbx.removeAttr('checked');
}
}
});

View File

@ -1,14 +1,13 @@
- act = action_name.intern
.sub-menu
.left
= @project.name
.left= @project.name
%nav
%ul
%li{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
= link_to t("layout.wiki.home"), project_wiki_index_path(@project)
= link_to t("wiki.home"), project_wiki_index_path(@project)
%li{:class => (act == :pages) ? 'active' : ''}
= link_to t("layout.wiki.pages"), pages_project_wiki_index_path(@project)
= link_to t("wiki.pages"), pages_project_wiki_index_path(@project)
%li{:class => (act == :wiki_history or act == :compare_wiki) ? 'active' : ''}
= link_to t("layout.wiki.wiki_history"), history_project_wiki_index_path(@project)
= link_to t("wiki.wiki_history"), history_project_wiki_index_path(@project)
%li{:class => (act == :git) ? 'active' : ''}
= link_to t("layout.wiki.git_access"), git_project_wiki_index_path(@project)
= link_to t("wiki.git_access"), git_project_wiki_index_path(@project)

View File

@ -1,23 +1,19 @@
#wiki-content
.wrap{:class => "#{has_footer? ? 'has-footer' : ''} #{has_sidebar? ? 'has-rightbar' : ''}"}
#wiki-body{:class => "gollum-#{format}-content"}
#template
= raw @content
#template= raw @content
- if has_sidebar?
#wiki-rightbar{:class => "gollum-#{sidebar_format}-content"}
= raw sidebar_content
#wiki-rightbar{:class => "gollum-#{sidebar_format}-content"}= raw sidebar_content
- if has_footer?
#wiki-footer{:class => "gollum-#{footer_format}-content"}
#footer-content
= raw footer_content
#footer-content= raw footer_content
#gollum-footer
%p#last-edit
= t("layout.wiki.last_edited_by")
%b
= user_link_by_user User.where(:email => author_email).first
= t("wiki.last_edited_by")
%b= user_link_by_user User.where(:email => author_email).first
= time_ago_in_words date.to_time - 4.hours, true
= t("layout.time.ago")
- unless action_name == 'preview' or cannot? :write, @project
%p#delete-link
= link_to project_wiki_path(@project, escaped_name), :method => :delete, :confirm => t("layout.confirm"), :class => 'button width100' do
%span= t("layout.wiki.delete_page")
%span= t("wiki.delete_page")

View File

@ -1,9 +1,9 @@
%p
- if @results and !@results.empty?
- if @results.present?
- @results.each do |result|
- if action_name == 'search'
= link_to result[:name], project_wiki_path(@project, CGI.escape(result[:name]))
%span.count= "(#{result.count} #{t("layout.wiki.matches")})"
%span.count= "(#{result.count} #{t("wiki.matches")})"
-else
= link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
%br
@ -12,10 +12,10 @@
- @st_ref = capture do
%strong= @ref || @query
- if action_name == 'search'
= raw t("layout.wiki.no_results_for_search", :query => @st_ref)
= raw t("wiki.no_results_for_search", :query => @st_ref)
- else
= raw t("layout.wiki.no_pages_in", :ref => @st_ref)
= raw t("wiki.no_pages_in", :ref => @st_ref)
-##footer
-# %ul.actions
-# %li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
/ #footer
/ %ul.actions
/ %li.minibutton= link_to t("wiki.back_to_top"), '#wiki'

View File

@ -1,6 +1,6 @@
#gollum-searchbar
= form_tag search_project_wiki_index_path(@project), :method => :get, :id => "gollum-search-form" do
#gollum-searchbar-fauxtext
= text_field_tag :q, t("layout.wiki.search_and_hellip"), :id => "search-query", :autocomplete => "on"
= link_to "#", :id => "search-submit", :title => t("layout.wiki.search_popup") do
%span= t("layout.wiki.search")
= text_field_tag :q, t("wiki.search_and_hellip"), :id => "search-query", :autocomplete => "on"
= link_to "#", :id => "search-submit", :title => t("wiki.search_popup") do
%span= t("wiki.search")

View File

@ -3,12 +3,12 @@
.admin-preferences
%ul
%li{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
= link_to t("layout.wiki.home"), project_wiki_index_path(@project)
= link_to t("wiki.home"), project_wiki_index_path(@project)
%li{:class => (act == :pages) ? 'active' : ''}
= link_to t("layout.wiki.pages"), pages_project_wiki_index_path(@project)
= link_to t("wiki.pages"), pages_project_wiki_index_path(@project)
%li{:class => (act == :wiki_history or act == :compare_wiki) ? 'active' : ''}
= link_to t("layout.wiki.wiki_history"), history_project_wiki_index_path(@project)
= link_to t("wiki.wiki_history"), history_project_wiki_index_path(@project)
%li{:class => (act == :git) ? 'active' : ''}
= link_to t("layout.wiki.git_access"), git_project_wiki_index_path(@project)
= link_to t("wiki.git_access"), git_project_wiki_index_path(@project)
%br
= render :partial => 'searchbar'
= render 'searchbar'

View File

@ -1,49 +1,22 @@
= render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
= render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
%h3.wiki
- if @name
= t("layout.wiki.history_for")
= t("wiki.history_for")
%strong= @page.name
- else
= t("layout.wiki.wiki_history")
= t("wiki.wiki_history")
%br
%br
.r
- if can? :read, @project
= link_to t("layout.wiki.back_to_history"),
@name ? history_project_wiki_path(@project, escaped_name) : history_project_wiki_index_path(@project),
:class => 'button width100'
= link_to t("wiki.back_to_history"), @name ? history_project_wiki_path(@project, escaped_name) : history_project_wiki_index_path(@project), :class => 'button width100'
#wiki-content
= render :partial => "compare"
-#%a{ :name => "wiki"}
-#.block
-# = render :partial => 'navigation'
-#
-# .content
-# #wiki-wrapper.inner.compare
-# #head
-# %h1.title
-# - if @name
-# = t("layout.wiki.history_for")
-# %strong= @page.name
-# - else
-# = t("layout.wiki.wiki_history")
-#
-# %ul.actions
-# - if can? :read, @project
-# %li.minibutton= link_to t("layout.wiki.back_to_history"),
-# @name ? history_project_wiki_path(@project, escaped_name) : history_project_wiki_index_path(@project)
-# = render :partial => 'searchbar'
-#
-# #wiki-content
-# = render :partial => "compare"
#wiki-content= render "compare"
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'

View File

@ -1,47 +1,19 @@
= render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
= render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
%h3.wiki
= t("layout.wiki.editing_page")
= t("wiki.editing_page")
%strong= @page.name
- if can? :read, @project
.r
= link_to t("layout.wiki.view_page"), view_path(@project, escaped_name),
:class => 'action-view-page button width100'
.r
= link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name),
:class => 'aciton-view-history button width100'
.r= link_to t("wiki.view_page"), view_path(@project, escaped_name), :class => 'action-view-page button width100'
.r= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'aciton-view-history button width100'
%br
%br
%br
#wiki-content
= render :partial => "editor"
-#%a{ :name => "wiki"}
-#.block
-# = render :partial => 'navigation'
-#
-# .content
-# #wiki-wrapper.inner
-# #head
-# %h1.title
-# = t("layout.wiki.editing_page")
-# %strong= @page.name
-#
-# %ul.actions
-# - if can? :read, @project
-# %li.minibutton
-# = link_to t("layout.wiki.view_page"), view_path(@project, escaped_name),
-# :class => 'action-view-page'
-# %li.minibutton
-# = link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name),
-# :class => 'aciton-view-history'
-#
-# #wiki-content
-# = render :partial => "editor"
#wiki-content= render "editor"
:javascript
jQuery(document).ready(function() {
@ -52,4 +24,4 @@
#gollum-editor { width: 100%; }
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'

View File

@ -1,29 +1,14 @@
=# render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
/ = render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
.desription-top
.img
= image_tag("code.png")
= render :partial => "git_access"
.img= image_tag("code.png")
= render "git_access"
.both
= render :partial => "git_access_message"
= render "git_access_message"
.both
-#.content
-# #wiki-wrapper.inner.compare
-# #head
-# %h1.title
-# = t("layout.wiki.wiki_git_access")
-#
-# #wiki-content
-# = render :partial => "git_access"
-# %br
-# = render :partial => "git_access_message"
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'

View File

@ -1,43 +1,11 @@
=# render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
/ = render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
.r
= link_to t("layout.wiki.compare_revisions"), "javascript:void(0);",
:class => "action-compare-revision button width100"
.r= link_to t("wiki.compare_revisions"), "javascript:void(0);", :class => "action-compare-revision button width100"
.both
= render :partial => 'history'
= render 'history'
.both
- content_for :sidebar do
- render :partial => 'sidebar'
-# .content
-# #wiki-wrapper.inner.history
-# #head
-# %h1.title
-# - if @name
-# = t("layout.wiki.history_for")
-# %strong= @page.name
-# - else
-# = t("layout.wiki.wiki_history")
-#
-# %ul.actions
-# - if @name
-# - if can? :read, @project
-# %li.minibutton
-# = link_to t("layout.wiki.view_page"), view_path(@project, escaped_name),
-# :class => 'action-view-page'
-# - if can? :write, @project
-# %li.minibutton
-# = link_to t("layout.wiki.edit_page"), edit_project_wiki_path(@project, escaped_name),
-# :class => 'aciton-edit-page'
-# - else
-# - if can? :read, @project
-# %li.minibutton
-# = link_to t("layout.wiki.view_page"), project_wiki_index_path(@project)
-# = render :partial => 'searchbar'
-#
-# #wiki-content
-# = render :partial => "history"
- render 'sidebar'

View File

@ -1,28 +1,13 @@
= render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
= render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
%h3.wiki
= t("layout.wiki.create_page")
= t("wiki.create_page")
%strong= @name
%br
#wiki-content
= render :partial => "editor"
-#%a{ :name => "wiki"}
-#.block
-# = render :partial => 'navigation'
-#
-# .content
-# #wiki-wrapper.inner
-# #head
-# %h1.title
-# = t("layout.wiki.create_page")
-# %strong= @name
-#
-# #wiki-content
-# = render :partial => "editor"
#wiki-content= render "editor"
:javascript
jQuery(document).ready(function() {
@ -33,4 +18,4 @@
#gollum-editor { width: 100%; }
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'

View File

@ -1,29 +1,11 @@
=# render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
/ = render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
- if can? :write, @project
.r
= link_to t("layout.wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project),
:id => 'minibutton-new-page', :class => 'button width100'
.r= link_to t("wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project), :id => 'minibutton-new-page', :class => 'button width100'
.both
= render :partial => "results"
-# .content
-# .inner
-# #wiki-wrapper.results
-# #head
-# - @st_ref = capture do
-# %strong= @ref
-# %h1.title= raw t("layout.wiki.all_pages_in")
-# %ul.actions
-# - if can? :read, @project
-# %li.minibutton
-# = link_to t("layout.wiki.home"), project_wiki_index_path(@project),
-# :class => 'action-edit-page'
-# = render :partial => 'searchbar'
-#
-# = render :partial => "results"
= render "results"
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'

View File

@ -1,37 +1,15 @@
=# render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
/ = render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
- @st_query = capture do
%strong= @query
%h1.title= raw t("layout.wiki.search_results_for", :query => @st_query)
%h1.title= raw t("wiki.search_results_for", :query => @st_query)
%ul.actions
- if can? :read, @project
%li.minibutton
= link_to t("layout.wiki.home"), project_wiki_index_path(@project),
:class => 'action-edit-page'
%li.minibutton= link_to t("wiki.home"), project_wiki_index_path(@project), :class => 'action-edit-page'
= render :partial => "results"
= render "results"
- content_for :sidebar do
- render :partial => 'sidebar'
-#%a{ :name => "wiki"}
-#.block
-# = render :partial => 'navigation'
-#
-# .content
-# .inner
-# #wiki-wrapper.results
-# #head
-# - @st_query = capture do
-# %strong= @query
-# %h1.title= raw t("layout.wiki.search_results_for", :query => @st_query)
-# %ul.actions
-# - if can? :read, @project
-# %li.minibutton
-# = link_to t("layout.wiki.home"), project_wiki_index_path(@project),
-# :class => 'action-edit-page'
-# = render :partial => 'searchbar'
-#
-# = render :partial => "results"
- render 'sidebar'

View File

@ -1,29 +1,29 @@
=# render :partial => 'gollum_includes'
=# render :partial => 'project_short'
= render :partial => 'projects/submenu'
/ = render 'gollum_includes'
/ = render 'project_short'
= render 'projects/submenu'
%h3.wiki
= @page.name
= "(#{t("layout.wiki.preview")})" if action_name == 'preview'
= "(#{t("wiki.preview")})" if action_name == 'preview'
- unless action_name == 'preview'
.r
= link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'button width100'
= link_to t("wiki.page_history"), history_project_wiki_path(@project, escaped_name), :class => 'button width100'
.r
- if @editable
= link_to t("layout.wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "button width100"
= link_to t("wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "button width100"
.r
- if can? :write, @project
= link_to t("layout.wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project),
:id => 'minibutton-new-page', :class => 'button width100'
= link_to t("wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project), :id => 'minibutton-new-page', :class => 'button width100'
%br
%br
%br
.both
=# render :partial => 'searchbar'
= render :partial => "page"
/ = render 'searchbar'
= render "page"
- content_for :sidebar do
- render :partial => 'sidebar'
- render 'sidebar'
:css
#wiki-content .wrap { width: 100% }

View File

@ -1,60 +1,65 @@
en:
layout:
wiki:
new_page: New Page
edit_page: Edit Page
delete_page: Delete this Page
page_history: Page History
create_page: Create page
wiki_git_access: Git Access
page_title: Page header
expand_collapse: Expand
last_edited_by: Last edited by
home: Home
pages: Pages
wiki_history: Wiki History
git_access: Git Access
search_and_hellip: Search & Hellip
search: Search
search_popup: Search this Wiki
commit_message_placeholder: Write a small message here explaining this change. (Optional)
edit_commit_message: Edit commit message
preview_title: Preview Page in new window
save_changes: Save current changes
save_button: Save Page
view_page: View Page
view_commit: View version
compare_revisions: Compare versions
back_to_top: Back to Top
no_pages_in: No pages in %{ref}.
no_results_for_search: Nothing found for %{query}.
matches: matches
back_to_history: Back to History
history_for: History for
editing_page: Editing
create_page: Create Page
revert_page: Revert Page
revert_pages: Revert Pages
all_pages_in: "All pages:"
search_results_for: "Search results for %{query}:"
preview: Preview
wiki:
new_page: New Page
edit_page: Edit Page
delete_page: Delete this Page
page_history: Page History
create_page: Create page
wiki_git_access: Git Access
page_title: Page header
expand_collapse: Expand
last_edited_by: Last edited by
home: Home
pages: Pages
wiki_history: Wiki History
git_access: Git Access
search_and_hellip: Search & Hellip
search: Search
search_popup: Search this Wiki
commit_message_placeholder: Write a small message here explaining this change. (Optional)
edit_commit_message: Edit commit message
preview_title: Preview Page in new window
save_changes: Save current changes
save_button: Save Page
view_page: View Page
view_commit: View version
compare_revisions: Compare versions
back_to_top: Back to Top
no_pages_in: No pages in %{ref}.
no_results_for_search: Nothing found for %{query}.
matches: matches
back_to_history: Back to History
history_for: History for
editing_page: Editing
create_page: Create Page
revert_page: Revert Page
revert_pages: Revert Pages
all_pages_in: "All pages:"
search_results_for: "Search results for %{query}:"
preview: Preview
footer: Footer
sidebar: Sidebar
clones:
http: HTTP
clones:
http: HTTP
editor:
bold: Bold
italic: Italic
code: Code
unordered_list: Unordered list
ordered_list: Ordered list
blockquote: Blockquote
horizontal_rule: Horizontal rule
h1: First level header
h2: Second level header
h3: Third level header
link: Link
image: Image
help: Help
editor:
bold: Bold
italic: Italic
code: Code
unordered_list: Unordered list
ordered_list: Ordered list
blockquote: Blockquote
horizontal_rule: Horizontal rule
h1: First level header
h2: Second level header
h3: Third level header
link: Link
image: Image
help: Help
seed:
welcome_content: |
# Welcome to **Wiki** #
Edit this page and create new ones.

View File

@ -1,60 +1,65 @@
ru:
layout:
wiki:
new_page: Новая
edit_page: Изменить
delete_page: Удалить страницу
page_history: История
create_page: Создать страницу
wiki_git_access: Доступ к Wiki через Git
page_title: Заголовок страницы
expand_collapse: Развернуть
last_edited_by: Последним редактировал
home: Главная
pages: Все страницы
wiki_history: История Wiki
git_access: Доступ через Git
search_and_hellip: Ключевые слова
search: Искать
search_popup: Искать в этой Wiki
commit_message_placeholder: Введите сопровождающее сообщение (опционально)
edit_commit_message: Редактировать сопровождающее сообщение
preview_title: Посмотреть в новом окне
save_changes: Сохранить текущие изменения
save_button: Сохранить
view_page: Показать
view_commit: Показать версию
compare_revisions: Сравнить версии
back_to_top: Наверх
no_pages_in: В %{ref} нет страниц для отображения.
no_results_for_search: По запросу %{query} ничего не найдено.
matches: Совпадений
back_to_history: Назад к истории
history_for: История для
editing_page: Редактирование страницы
create_page: Создать страницу
revert_page: Откатить изменения
revert_pages: Откатить изменения
all_pages_in: "Все страницы:"
search_results_for: "Результаты поиска для %{query}:"
preview: Предпросмотр
wiki:
new_page: Новая
edit_page: Изменить
delete_page: Удалить страницу
page_history: История
create_page: Создать страницу
wiki_git_access: Доступ к Wiki через Git
page_title: Заголовок страницы
expand_collapse: Развернуть
last_edited_by: Последним редактировал
home: Главная
pages: Все страницы
wiki_history: История Wiki
git_access: Доступ через Git
search_and_hellip: Ключевые слова
search: Искать
search_popup: Искать в этой Wiki
commit_message_placeholder: Введите сопровождающее сообщение (опционально)
edit_commit_message: Редактировать сопровождающее сообщение
preview_title: Посмотреть в новом окне
save_changes: Сохранить текущие изменения
save_button: Сохранить
view_page: Показать
view_commit: Показать версию
compare_revisions: Сравнить версии
back_to_top: Наверх
no_pages_in: В %{ref} нет страниц для отображения.
no_results_for_search: По запросу %{query} ничего не найдено.
matches: Совпадений
back_to_history: Назад к истории
history_for: История для
editing_page: Редактирование страницы
create_page: Создать страницу
revert_page: Откатить изменения
revert_pages: Откатить изменения
all_pages_in: "Все страницы:"
search_results_for: "Результаты поиска для %{query}:"
preview: Предпросмотр
footer: Подвал
sidebar: Сайдбар
clones:
http: HTTP
clones:
http: HTTP
editor:
bold: Жирный
italic: Курсив
code: Исходный код
unordered_list: Маркированный список
ordered_list: Нумерованный список
blockquote: Цитата
horizontal_rule: Горизонтальная черта
h1: Заголовок первого уровня
h2: Заголовок второго уровня
h3: Заголовок третьего уровня
link: Ссылка
image: Изображение
help: Помощь
editor:
bold: Жирный
italic: Курсив
code: Исходный код
unordered_list: Маркированный список
ordered_list: Нумерованный список
blockquote: Цитата
horizontal_rule: Горизонтальная черта
h1: Заголовок первого уровня
h2: Заголовок второго уровня
h3: Заголовок третьего уровня
link: Ссылка
image: Изображение
help: Помощь
seed:
welcome_content: |
# Добро пожаловать в **Wiki** #
Отредактируйте эту страницу и создайте новые.

View File

@ -1,7 +0,0 @@
en:
wiki:
seed:
welcome_content: |
# Welcome to **Wiki** #
Edit this page and create new ones.

View File

@ -1,7 +0,0 @@
ru:
wiki:
seed:
welcome_content: |
# Добро пожаловать в **Wiki** #
Отредактируйте эту страницу и создайте новые.