#345: fixed presenters, etc

This commit is contained in:
Vokhmin Alexey V 2014-03-14 02:31:28 +04:00
parent 331944e0fd
commit 4c398ab710
3 changed files with 4 additions and 3 deletions

View File

@ -173,7 +173,7 @@ module MarkdownHelper
url = project_pull_request_path(issue.project, issue.pull_request) url = project_pull_request_path(issue.project, issue.pull_request)
else else
title = "#{Issue.model_name.human}: #{issue.title}" title = "#{Issue.model_name.human}: #{issue.title}"
url = project_issue_path(issue.project.owner, issue.project.name, issue.serial_id) url = project_issue_path(issue.project, issue.serial_id)
end end
link_to(identifier, url, html_options.merge(title: title, class: "gfm gfm-issue #{html_options[:class]}")) link_to(identifier, url, html_options.merge(title: title, class: "gfm gfm-issue #{html_options[:class]}"))
end end

View File

@ -4,7 +4,7 @@
- if owner.own_projects.exists? name: name - if owner.own_projects.exists? name: name
%p.center %p.center
=t 'layout.projects.already_exists' =t 'layout.projects.already_exists'
=link_to full_name, project_path(owner, name) =link_to full_name, project_path(@project)
- else - else
= form_for @project, url: fork_project_path(@project), html: { class: :form, multipart: true, method: :post } do |f| = form_for @project, url: fork_project_path(@project), html: { class: :form, multipart: true, method: :post } do |f|
= hidden_field_tag :group, owner.id if owner.class == Group = hidden_field_tag :group, owner.id if owner.class == Group

View File

@ -1,9 +1,10 @@
# This code based on https://github.com/ihoka/viewtastic # This code based on https://github.com/ihoka/viewtastic
module RosaPresenter module RosaPresenter
class Base class Base
include ActionDispatch::Routing::UrlFor # include ActionDispatch::Routing::UrlFor
include ActionView::Helpers::UrlHelper include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TextHelper include ActionView::Helpers::TextHelper
include ActionView::Helpers::OutputSafetyHelper
include ActionView::Helpers::JavaScriptHelper include ActionView::Helpers::JavaScriptHelper
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers