Commit 2681a01b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

add resize button for better wiki reading

parent a685624d
...@@ -53,6 +53,12 @@ $ -> ...@@ -53,6 +53,12 @@ $ ->
$('.trigger-submit').on 'change', -> $('.trigger-submit').on 'change', ->
$(@).parents('form').submit() $(@).parents('form').submit()
# Wiki resizer
$('.wiki-fullscreen').on 'click', ->
$('.writeboards-menu').toggleClass('hide')
$('.writeboards-content').toggleClass('span9').toggleClass('span12')
# Flash # Flash
if (flash = $(".flash-container")).length > 0 if (flash = $(".flash-container")).length > 0
flash.click -> $(@).fadeOut() flash.click -> $(@).fadeOut()
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
%span= diff.old_path %span= diff.old_path
- if @commit.prev_commit - if @commit.prev_commit
= link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn pull-right view-file'} do = link_to project_tree_path(@project, tree_join(@commit.prev_commit_id, diff.new_path)), {:class => 'btn btn-tiny pull-right view-file'} do
View file @ View file @
%span.commit-short-id= @commit.short_id(6) %span.commit-short-id= @commit.short_id(6)
- else - else
......
%h3.page_title Editing page %h3.page_title Editing page
%hr
= render 'form' = render 'form'
.pull-right .pull-right
......
.row .row
.span3 .span3.writeboards-menu
= render 'writeboards/nav' = render 'writeboards/nav'
.span9 .span9.writeboards-content
%h3.page_title - if @wiki != @most_recent_wiki
.alert
This is an old version of this page.
You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}.
.file_holder
.file_title
= link_to '#', class: 'wiki-fullscreen' do
%i.icon-resize-horizontal
= @wiki.title = @wiki.title
%span.pull-right %span.options
= link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do = link_to pages_project_wikis_path(@project), class: "btn btn-tiny grouped" do
Pages Pages
- if can? current_user, :write_wiki, @project - if can? current_user, :write_wiki, @project
= link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do = link_to history_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do
History History
= link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do = link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-tiny grouped" do
%i.icon-edit %i.icon-edit
Edit Edit
%br
- if @wiki != @most_recent_wiki
.warning_message
This is an old version of this page.
You can view the #{link_to "most recent version", project_wiki_path(@project, @wiki)} or browse the #{link_to "history", history_project_wiki_path(@project, @wiki)}.
.file_holder
.file_content.wiki .file_content.wiki
= preserve do = preserve do
= markdown @wiki.content = markdown @wiki.content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment