修正了讨论区部分问题;version部分问题

This commit is contained in:
zhangyang 2013-08-21 16:43:47 +08:00
parent d92755f805
commit 38ed91746f
4 changed files with 57 additions and 71 deletions

View File

@ -76,7 +76,10 @@ class BoardsController < ApplicationController
@board.safe_attributes = params[:board]
if @board.save
flash[:notice] = l(:notice_successful_create)
redirect_to_settings_in_projects
#Modified by young
#redirect_to_settings_in_projects
redirect_to project_board_path(@project, @board)
#Ended by young
else
render :action => 'new'
end

View File

@ -1,5 +1,9 @@
<h3><%= l(:label_board_plural) %></h3>
<div class="contextual">
<% if User.current.logged? %>
<%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %>
<% end %>
</div>
<h3 style="padding-top:0px;"><%= l(:label_board_plural) %></h3>
<table class="list boards">
<thead><tr>
<th><%= l(:label_board) %></th>

View File

@ -4,12 +4,12 @@
<%= link_to l(:label_message_new),
new_board_message_path(@board),
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %>
<%= watcher_link(@board, User.current) %>
</div>
<div id="add-message" style="display:none;">
<% if User.current.allowed_to?(:add_messages, @board.project) %>
<% if User.current.logged? %>
<h3><%= link_to h(@board.name), project_board_path(@project, @board) %> &#187; <%= l(:label_message_new) %></h3>
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>

View File

@ -1,77 +1,56 @@
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<div class="contextual" style="padding-right: 10px;">
<%= render :partial => 'navigation' %>
<!--modified by young-->
<div class="contextual">
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
<%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
<h3><%= h(@version.name) %></h3>
<h3>
<%= render :partial => 'breadcrumbs',
:locals => { :path => @path, :kind => 'dir', :revision => @rev } %>
<% if @repositories.size > 1 %>
<p style=" word-wrap: break-word; word-break: break-all">
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
link_to h(repo.name),
{:controller => 'repositories', :action => 'show',
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
:class => 'repository' + (repo == @repository ? ' selected' : '')
}.join('&nbsp|&nbsp').html_safe %>)</p>
<% end %>
</h3>
<div id="roadmap">
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%= render :partial => 'dir_list' %>
<div class="splitcontent">
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
<table>
<tr>
<th><%= l(:field_estimated_hours) %></th>
<td class="total-hours"><%= html_hours(l_hours(@version.estimated_hours)) %></td>
</tr>
<% if User.current.allowed_to?(:view_time_entries, @project) %>
<tr>
<th><%= l(:label_spent_time) %></th>
<td class="total-hours"><%= html_hours(l_hours(@version.spent_hours)) %></td>
</tr>
<% end %>
</table>
</fieldset>
<% end %>
<%= render_properties(@properties) %>
<div id="status_by" style="margin-top:10px;"><!--by young-->
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
</div>
</div>
<% if authorize_for('repositories', 'revisions') %>
<% if @changesets && !@changesets.empty? %>
<h3><%= l(:label_latest_revision_plural) %></h3>
<%= render :partial => 'revisions',
:locals => {:project => @project, :path => @path,
:revisions => @changesets, :entry => nil }%>
<% end %>
<p>
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
sep = '' %>
<% if @repository.supports_all_revisions? && @path.blank? %>
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project,
:repository_id => @repository.identifier_param %>
<% sep = '|' %>
<% end %>
<% if @repository.supports_directory_revisions? &&
( has_branches || !@path.blank? || !@rev.blank? ) %>
<%= sep %>
<%= link_to l(:label_view_revisions),
:action => 'changes',
:path => to_path_param(@path),
:id => @project,
:repository_id => @repository.identifier_param,
:rev => @rev %>
<% end %>
</p>
<% if @repository.supports_all_revisions? %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(
:atom, params.merge(
{:format => 'atom', :action => 'revisions',
:id => @project, :page => nil, :key => User.current.rss_key})) %>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'Atom',
:url => {:action => 'revisions', :id => @project,
:repository_id => @repository.identifier_param,
:key => User.current.rss_key} %>
<% end %>
<% if @issues.present? %>
<%= form_tag({}) do -%>
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<%- @issues.each do |issue| -%>
<tr class="hascontextmenu">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
</tr>
<% end %>
</table>
<% end %>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<%= context_menu issues_context_menu_path %>
<% end %>
</div>
<% html_title(l(:label_repository)) -%>
<%= call_hook :view_versions_show_bottom, :version => @version %>
<% html_title @version.name %>