diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 071904482..1a59f5460 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -139,6 +139,8 @@ module ApplicationHelper format_wiki_link = Proc.new {|project, title| url_for :controller => 'wiki', :action => 'index', :id => project, :page => title } end + project = options[:project] || @project + # turn wiki links into html links # example: # [[mypage]] @@ -148,15 +150,15 @@ module ApplicationHelper # [[project:mypage]] # [[project:mypage|mytext]] text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) do |m| - project = @project + link_project = project page = $1 title = $3 if page =~ /^([^\:]+)\:(.*)$/ - project = Project.find_by_name($1) || Project.find_by_identifier($1) + link_project = Project.find_by_name($1) || Project.find_by_identifier($1) page = $2 title = $1 if page.blank? end - link_to((title || page), format_wiki_link.call(project, Wiki.titleize(page)), :class => 'wiki-page') + link_to((title || page), format_wiki_link.call(link_project, Wiki.titleize(page)), :class => 'wiki-page') end # turn issue ids into links @@ -167,7 +169,7 @@ module ApplicationHelper # turn revision ids into links (@project needed) # example: # r52 -> r52 (@project.id is 6) - text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", {:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1}, :class => 'changeset' } if @project + text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", {:controller => 'repositories', :action => 'revision', :id => project.id, :rev => $1}, :class => 'changeset' } if project # when using an image link, try to use an attachment, if possible attachments = options[:attachments] diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml index e181f85c5..d231be102 100644 --- a/app/views/admin/projects.rhtml +++ b/app/views/admin/projects.rhtml @@ -27,7 +27,7 @@ <% for project in @projects %> "> <%= project.active? ? link_to(project.name, :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %> - <%=h project.description %> + <%= textilizable project.description, :project => project %> <%= image_tag 'true.png' if project.is_public? %> <%= project.children.size %> <%= format_date(project.created_on) %> diff --git a/app/views/projects/_form.rhtml b/app/views/projects/_form.rhtml index 9eb933035..585217e16 100644 --- a/app/views/projects/_form.rhtml +++ b/app/views/projects/_form.rhtml @@ -8,10 +8,11 @@

<%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %>

<% end %> -

<%= f.text_area :description, :required => true, :cols => 60, :rows => 3 %>
<%= l(:text_caracters_maximum, 255) %>

+

<%= f.text_area :description, :required => true, :cols => 60, :rows => 5 %><%= l(:text_caracters_maximum, 255) %>

<%= f.text_field :identifier, :required => true, :size => 15, :disabled => @project.identifier_frozen? %>
<%= l(:text_length_between, 3, 12) %> <%= l(:text_project_identifier_info) unless @project.identifier_frozen? %>

<%= f.text_field :homepage, :size => 40 %>

<%= f.check_box :is_public %>

+<%= wikitoolbar_for 'project_description' %> <% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

diff --git a/app/views/projects/list.rhtml b/app/views/projects/list.rhtml index 54cc78738..24448be48 100644 --- a/app/views/projects/list.rhtml +++ b/app/views/projects/list.rhtml @@ -11,7 +11,7 @@ "> <%= link_to project.name, {:action => 'show', :id => project}, :class => (@logged_in_user && @logged_in_user.role_for_project(project) ? "icon icon-fav" : "") %>
- <%=h project.description %> + <%= textilizable project.description, :project => project %> <%= link_to(project.parent.name, :action => 'show', :id => project.parent) unless project.parent.nil? %> <%= format_date(project.created_on) %> diff --git a/app/views/welcome/index.rhtml b/app/views/welcome/index.rhtml index b91efec28..399e444ed 100644 --- a/app/views/welcome/index.rhtml +++ b/app/views/welcome/index.rhtml @@ -15,7 +15,7 @@ <% for project in @projects %>
  • <%= link_to project.name, :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>)
    - <%=h project.description %> + <%= textilizable project.description, :project => project %>
  • <% end %> diff --git a/public/stylesheets/jstoolbar.css b/public/stylesheets/jstoolbar.css index 37c3a2510..62976e537 100644 --- a/public/stylesheets/jstoolbar.css +++ b/public/stylesheets/jstoolbar.css @@ -6,7 +6,7 @@ } .jstHandle { - height: 16px; + height: 10px; font-size: 0.1em; cursor: s-resize; /*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/