diff --git a/app/views/wiki/_git_access.html.haml b/app/views/wiki/_git_access.html.haml
index ee4e52214..88ffcd715 100644
--- a/app/views/wiki/_git_access.html.haml
+++ b/app/views/wiki/_git_access.html.haml
@@ -1,23 +1,19 @@
-.url-box
- %ul.clone-urls
- %li.http-clone-url.selected
- = link_to t("layout.wiki.clones.http"), git_repo_url(@project.wiki_repo_name),
- :'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
- %input.url-field{:type => 'text', :spellcheck => 'false'}
- %p.url-description
- %strong
- access
+.name
+ = link_to t("layout.wiki.clones.http"), git_repo_url(@project.wiki_repo_name),
+ :'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
+ #url-field{:style => 'display: inline'}
+.role
:javascript
$(document).ready(function() {
- var link = $('li.http-clone-url a').first();
+ var link = $('.name a').first();
- $('.url-box input.url-field').attr('value', link.attr('href'));
- $('.url-box p.url-description strong').text(link.attr('data-permissions'));
+ $('.name #url-field').text(link.attr('href'));
+ $('.role').text(link.attr('data-permissions'));
- $('li.http-clone-url a').live('click', function(e) {
+ $('.name a').live('click', function(e) {
e.preventDefault();
- $('.url-box input.url-field').attr('value', $(this).attr('href'));
- $('.url-box p.url-description strong').text($(this).attr('data-permissions'));
+ $('.name #url-field').text($(this).attr('href'));
+ $('.role').text($(this).attr('data-permissions'));
});
});
diff --git a/app/views/wiki/_git_access_message.en.html.haml b/app/views/wiki/_git_access_message.en.html.haml
index 599cf7da5..14cbdd513 100644
--- a/app/views/wiki/_git_access_message.en.html.haml
+++ b/app/views/wiki/_git_access_message.en.html.haml
@@ -1,7 +1,7 @@
-#template
- %p
+%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/
%ol
%li
With your favorite text editor or IDE.
@@ -11,7 +11,6 @@
Ruby API.
%li
With the Gollum Ruby API.
- %p
- 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.
+ 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.
diff --git a/app/views/wiki/_git_access_message.ru.html.haml b/app/views/wiki/_git_access_message.ru.html.haml
index 37176047f..8527ff9c9 100644
--- a/app/views/wiki/_git_access_message.ru.html.haml
+++ b/app/views/wiki/_git_access_message.ru.html.haml
@@ -1,8 +1,8 @@
-#template
- %p
- Все данные вашей Wiki могут быть клонированы из Git-репозитория для
- доступа без интернета. В этом случае вы можете редактировать страницы
- следующими способами:
+%p
+ Все данные вашей Wiki могут быть клонированы из Git-репозитория для
+ доступа без интернета. В этом случае вы можете редактировать страницы
+ следующими способами:
+ %br/
%ol
%li
Вашим любимым текстовым редактором или IDE.
@@ -12,7 +12,6 @@
Ruby API.
%li
С помощью Gollum Ruby API.
- %p
- Когда изменения будут завершены, просто запуште их обратно в нашу систему
- чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми
- же правами, что и к проекту, с которым она связана.
+ Когда изменения будут завершены, просто запуште их обратно в нашу систему
+ чтобы увидеть их на сайте. Доступ к репозиторию Wiki осуществляется с теми
+ же правами, что и к проекту, с которым она связана.
diff --git a/app/views/wiki/_history.html.haml b/app/views/wiki/_history.html.haml
index bb14ce8e2..cfec9fae1 100644
--- a/app/views/wiki/_history.html.haml
+++ b/app/views/wiki/_history.html.haml
@@ -1,36 +1,62 @@
-#wiki-history
- %ul.actions
- %li.minibutton
- = link_to t("layout.wiki.compare_revisions"), "javascript:void(0);",
- :class => "action-compare-revision"
+= form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
+ %table.wiki{:cellpadding => "0", :cellspacing => "0"}
+ - @versions.each do |v|
+ %tr.history
+ %td.td1
+ %span#niceCheckbox1.niceCheck-main{:onclick => "changeCheck(this)"}
+ = check_box_tag "versions[]", v.id
+ %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"}
+ %span.username= user.present? ? user.uname : v.author.name.encode_to_default
+ .name
+ .both
+ %td.td3
+ %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")}]"
+ - else
+ = "[#{v.id[0..6]}]"
- = form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
- %fieldset
- %table
- %tbody
- - @versions.each do |v|
- %tr{:class => cycle("odd", "even")}
- %td.checkbox
- = check_box_tag "versions[]", v.id
- %td.author
- - user = User.where(:email => v.author.email).first
- = 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"}
- %span.username= user.present? ? user.uname : v.author.name.encode_to_default
- %td.commit-name
- %span.time-elapsed= "#{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")}]"
- - else
- = "[#{v.id[0..6]}]"
-
-#gollum-footer
- %ul.actions
- %li.minibutton
- = link_to t("layout.wiki.compare_revisions"), "javascript:void(0);", :class => "action-compare-revision"
- %li.minibutton
- = link_to t("layout.wiki.back_to_top"), "#wiki", :class => "action-back-to-top"
+-##wiki-history
+-# %ul.actions
+-# %li.minibutton
+-# = link_to t("layout.wiki.compare_revisions"), "javascript:void(0);",
+-# :class => "action-compare-revision"
+-#
+-# = form_tag compare_path(@project, @name), :name => "compare-versions", :id => "version-form" do
+-# %fieldset
+-# %table
+-# %tbody
+-# - @versions.each do |v|
+-# %tr{:class => cycle("odd", "even")}
+-# %td.checkbox
+-# = check_box_tag "versions[]", v.id
+-# %td.author
+-# - user = User.where(:email => v.author.email).first
+-# = 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"}
+-# %span.username= user.present? ? user.uname : v.author.name.encode_to_default
+-# %td.commit-name
+-# %span.time-elapsed= "#{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")}]"
+-# - else
+-# = "[#{v.id[0..6]}]"
+-#
+-##gollum-footer
+-# %ul.actions
+-# %li.minibutton
+-# = link_to t("layout.wiki.compare_revisions"), "javascript:void(0);", :class => "action-compare-revision"
+-# %li.minibutton
+-# = link_to t("layout.wiki.back_to_top"), "#wiki", :class => "action-back-to-top"
diff --git a/app/views/wiki/_navigation.html.haml b/app/views/wiki/_navigation.html.haml
index ce5b2707b..7dce8dffc 100644
--- a/app/views/wiki/_navigation.html.haml
+++ b/app/views/wiki/_navigation.html.haml
@@ -1,7 +1,7 @@
- act = action_name.intern
.sub-menu
.left
- WacomDrivers
+ = @project.name
%nav
%ul
%li{:class => ((act == :show and @name == 'Home') or act == :index) ? 'active' : ''}
diff --git a/app/views/wiki/_results.html.haml b/app/views/wiki/_results.html.haml
index 97dcfb777..ffe50291a 100644
--- a/app/views/wiki/_results.html.haml
+++ b/app/views/wiki/_results.html.haml
@@ -1,22 +1,21 @@
-#results
- - if @results and !@results.empty?
- %ul
- - @results.each do |result|
- %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
- - @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)
+%p
+- if @results and !@results.empty?
+ - @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")})"
+ -else
+ = link_to result.name, project_wiki_path(@project, CGI.escape(result.name))
+ %br
+- else
+ %p#no-results
+ - @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
- %li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
+-##footer
+-# %ul.actions
+-# %li.minibutton= link_to t("layout.wiki.back_to_top"), '#wiki'
diff --git a/app/views/wiki/_sidebar.html.haml b/app/views/wiki/_sidebar.html.haml
new file mode 100644
index 000000000..44dbbb912
--- /dev/null
+++ b/app/views/wiki/_sidebar.html.haml
@@ -0,0 +1,14 @@
+- act = action_name.intern
+%aside
+ .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)
+ %li{:class => (act == :pages) ? 'active' : ''}
+ = link_to t("layout.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)
+ %li{:class => (act == :git) ? 'active' : ''}
+ = link_to t("layout.wiki.git_access"), git_project_wiki_index_path(@project)
+ %br
+ = render :partial => 'searchbar'
diff --git a/app/views/wiki/git.html.haml b/app/views/wiki/git.html.haml
index 19f9566e0..0db37abd4 100644
--- a/app/views/wiki/git.html.haml
+++ b/app/views/wiki/git.html.haml
@@ -1,22 +1,29 @@
-= render :partial => 'gollum_includes'
-= render :partial => 'project_short'
+=# render :partial => 'gollum_includes'
+=# render :partial => 'project_short'
+= render :partial => 'projects/submenu'
-%a{ :name => "wiki"}
-.block
- = render :partial => 'navigation'
- .content
- #wiki-wrapper.inner.compare
- #head
- %h1.title
- = t("layout.wiki.wiki_git_access")
+.desription-top
+ .img
+ = image_tag("code.png")
+ = render :partial => "git_access"
+ .both
+= render :partial => "git_access_message"
- #wiki-content
- = render :partial => "git_access"
- %br
- = render :partial => "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 => 'projects/sidebar'
+ - render :partial => 'sidebar'
diff --git a/app/views/wiki/history.html.haml b/app/views/wiki/history.html.haml
index 11d1e0e26..1203ca554 100644
--- a/app/views/wiki/history.html.haml
+++ b/app/views/wiki/history.html.haml
@@ -1,38 +1,43 @@
-= render :partial => 'gollum_includes'
-= render :partial => 'project_short'
+=# render :partial => 'gollum_includes'
+=# render :partial => 'project_short'
+= render :partial => 'projects/submenu'
-%a{ :name => "wiki"}
-.block
- = render :partial => 'navigation'
-
- .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"
+.r
+ = link_to t("layout.wiki.compare_revisions"), "javascript:void(0);",
+ :class => "action-compare-revision button width100"
+.both
+= render :partial => 'history'
+.both
- content_for :sidebar do
- - render :partial => 'projects/sidebar'
+ - 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"
diff --git a/app/views/wiki/pages.html.haml b/app/views/wiki/pages.html.haml
index 03d079b90..3ba917166 100644
--- a/app/views/wiki/pages.html.haml
+++ b/app/views/wiki/pages.html.haml
@@ -1,25 +1,29 @@
-= render :partial => 'gollum_includes'
-= render :partial => 'project_short'
+=# render :partial => 'gollum_includes'
+=# render :partial => 'project_short'
+= render :partial => 'projects/submenu'
-%a{ :name => "wiki"}
-.block
- = render :partial => 'navigation'
+- 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'
+.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"
+-# .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"
- content_for :sidebar do
- - render :partial => 'projects/sidebar'
+ - render :partial => 'sidebar'
diff --git a/app/views/wiki/search.html.haml b/app/views/wiki/search.html.haml
index a1cc25ee2..e3acbd84c 100644
--- a/app/views/wiki/search.html.haml
+++ b/app/views/wiki/search.html.haml
@@ -1,25 +1,37 @@
-= render :partial => 'gollum_includes'
-= render :partial => 'project_short'
+=# render :partial => 'gollum_includes'
+=# render :partial => 'project_short'
+= render :partial => 'projects/submenu'
-%a{ :name => "wiki"}
-.block
- = render :partial => 'navigation'
+- @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'
- .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 :partial => "results"
- content_for :sidebar do
- - render :partial => 'projects/sidebar'
+ - 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"
diff --git a/app/views/wiki/show.html.haml b/app/views/wiki/show.html.haml
index a9347530b..582284289 100644
--- a/app/views/wiki/show.html.haml
+++ b/app/views/wiki/show.html.haml
@@ -1,30 +1,23 @@
-= render :partial => 'gollum_includes'
-= render :partial => 'project_short'
+=# render :partial => 'gollum_includes'
+=# render :partial => 'project_short'
+= render :partial => 'projects/submenu'
-%a{ :name => "wiki"}
-.block
- = render :partial => 'navigation'
-
- .content
- .inner
- #wiki-wrapper.page
- #head
- %h1.title
- = @page.name
- = "(#{t("layout.wiki.preview")})" if action_name == 'preview'
- - unless action_name == 'preview'
- %ul.actions
- - if can? :write, @project
- %li.minibutton.jaws
- = link_to t("layout.wiki.new_page"), '#', :'data-url' => project_wiki_index_path(@project),
- :id => 'minibutton-new-page'
- - if @editable
- %li.minibutton
- = link_to t("layout.wiki.edit_page"), edit_project_wiki_path(@project, escaped_name), :class => "action-edit-page"
- %li.minibutton= link_to t("layout.wiki.page_history"), history_project_wiki_path(@project, escaped_name)
- = render :partial => 'searchbar'
-
- = render :partial => "page"
+%h3.wiki
+ = @page.name
+ = "(#{t("layout.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'
+ .r
+ - if @editable
+ = link_to t("layout.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'
+.both
+=# render :partial => 'searchbar'
+= render :partial => "page"
- content_for :sidebar do
- - render :partial => 'projects/sidebar'
+ - render :partial => 'sidebar'
diff --git a/vendor/assets/javascripts/gollum/gollum.js b/vendor/assets/javascripts/gollum/gollum.js
index 6ca595d91..e838d956e 100755
--- a/vendor/assets/javascripts/gollum/gollum.js
+++ b/vendor/assets/javascripts/gollum/gollum.js
@@ -38,20 +38,21 @@ $(document).ready(function() {
});
}
- if ($('#wiki-wrapper').hasClass('history')) {
- $('#wiki-history td.checkbox input').each(function() {
+ //if ($('#wiki-wrapper').hasClass('history')) {
+ $('tr.history td input').each(function() {
$(this).click(highlightChecked);
if ( $(this).is(':checked') ) {
nodeSelector.checkNode($(this));
}
});
- if ($('.history a.action-compare-revision').length) {
- $('.history a.action-compare-revision').click(function() {
+ // ATTENTION: santaux edited these lines
+ if ($('a.action-compare-revision').length) {
+ $('a.action-compare-revision').click(function() {
$("#version-form").submit();
});
}
- }
+ //}