-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload files and ckeditor #31
Open
vitstradal
wants to merge
15
commits into
gugod:development
Choose a base branch
from
vitstradal:upload_and_ckeditor3
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6f30d1e
upload file
vitstradal b071dee
opravene Gollum::File, pridany reverse_markdown
vitstradal 509bddc
raw view
vitstradal 9b0a9f8
preklady
vitstradal 786d6b7
uprava modelu na logictejsi jmena, ladeni wiki
vitstradal a91e515
list of pages and files
vitstradal 50962c8
sidebar
vitstradal 27fae9b
fix: links
vitstradal baf0574
Merge remote branch 'remotes/origin/ckeditor' into ckeditor
vitstradal 172d24d
warning sabout not installed plugin redmine_ckeditor
vitstradal d31a63d
Merge branch 'ckeditor' of file:///home/redmine/redmine-2.1.2/plugins…
vitstradal 5352c06
Merge remote branch 'remotes/origin/ckeditor' into ckeditor
vitstradal e3d7b0a
options cleanup
vitstradal 3a266ae
edit: preview on top
vitstradal 1b0c884
cleanups
vitstradal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'uri' | ||
module GollumPagesHelper | ||
def gollum_include_ckeditor(field_id) | ||
return '' if ! @project.gollum_wiki.use_ckeditor; | ||
ckeditor_include + ckeditor(field_id) | ||
end | ||
|
||
def ckeditor_include | ||
javascript_include_tag('ckeditor/ckeditor', :plugin => 'redmine_ckeditor') | ||
end | ||
|
||
def ckeditor(field_id) | ||
url = url_for( | ||
:controller => 'gollum_pages', | ||
:action => 'upload', | ||
:authenticity_token => form_authenticity_token) | ||
|
||
javascript_tag <<-EOT | ||
CKEDITOR.replace('#{field_id}', { | ||
filebrowserImageUploadUrl : '#{url}', | ||
}); | ||
CKEDITOR.config.height='500px'; | ||
EOT | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<h3><%= l(:Gollum) %></h3> | ||
|
||
<%= link_to l(:field_start_page), {:action => 'show'} %><br /> | ||
<%= link_to l(:field_start_page), {:controller=>'gollum_pages', :action => 'show'} %><br /> | ||
<%= link_to l(:upload), {:controller=>'gollum_pages', :action => 'upload'} %><br /> | ||
<%= link_to l(:new_page), {:controller=>'gollum_pages', :action => 'newpage'} %><br /> | ||
<%= link_to l(:list_pages), {:controller=>'gollum_pages', :action => 'list'} %><br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
<h2><%= l(:page_list) %></h2> | ||
|
||
<h3>Pages</h3> | ||
<ul> | ||
<% @pages.each do |page| %> | ||
<li> <%= link_to page.name, {:action=>:show, :id=>page.name}%></li> | ||
<% end %> | ||
</ul> | ||
|
||
<h3>Files</h3> | ||
<table> | ||
<% @files.each do |filename| %> | ||
<tr><td><a href="<%= filename%>"><img height="30px" src='<%= filename %>'></a></td><td><%= filename %></td></tr> | ||
<% end %> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
<h2><%= l :create_new_page %> </h2> | ||
|
||
<%= form_for :page, :url => url_for(:controller=>'gollum_pages',:action=>'edit') do |f| -%> | ||
|
||
<p> | ||
<label label-for='pageid'><%= l :new_page_name%></label> | ||
<input type='text' id='pageid' name='id'> | ||
<input type='submit' value="<%= l(:button_create) %>"> | ||
</p> | ||
|
||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<h1>Upload file</h1> | ||
<div>Upload: | ||
|
||
<%= form_tag({:action => :upload}, :multipart => true) do %> | ||
<%= file_field_tag "upload" %> | ||
<input type='submit' value='upload'> | ||
<% end %> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ckeditor related? What you mean by prewiki wikiing? What are you trying to achieve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prewiking: when gollum displays page, it render it by wiki syntax of your choice (creole, textile, markdown, etc).
But before it, gollum expands links in form [[link]]. and one form of gollumwiki is [[Text to display|http://exapmlec.om]], which is exactly oposite as in creole (and as natural). See https://github.com/github/gollum#page-links