diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 57f26103c..36ce47d9e 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -136,7 +136,7 @@ class VersionsController < ApplicationController respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) - redirect_back_or_default settings_project_path(@project, :tab => 'versions') + redirect_to settings_project_path(@project, :tab => 'versions') } format.api { render_api_ok } end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 599f27215..9afd67001 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,6 +49,16 @@ module ApplicationHelper end end + def get_project_type_css(value) + if value == 1 + "pr_friend" + elsif value == 1 + "pr_keyan" + else + "pr_kafa" + end + end + # Time 2015-03-24 16:38:05 # Author lizanle # Description after save后需要进行资源记录的更新 @@ -384,9 +394,9 @@ module ApplicationHelper def format_version_name(version) if version.project == @project - h(version) + h(truncate(version.name,:length=>20)) else - h("#{version.project} - #{version}") + h("#{version.project} - #{truncate(version.name,:length=>20)}") end end diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 97cbefce9..d8b53acd0 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 4b23897d3..49ea0d57e 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -1,5 +1,5 @@ -<%= watcher_link_issue(@issue, User.current) %> +<%#= watcher_link_issue(@issue, User.current) %> <%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 7349a5f1d..5679c92d4 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -52,7 +52,7 @@
  • <% if @issue.safe_attribute? 'description' %> - + <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> @@ -87,7 +87,7 @@

  • - + <%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
  • @@ -95,22 +95,22 @@ <%= render :partial => 'issues/attributes' %>
    -
    - + + - - <%= link_to "", - {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, - :remote => true, - :method => 'get', + + <%#= link_to "", +# {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, +# :remote => true, +# :method => 'get', :class => "pic_sch mt5 ml5" %> - - <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> -
    - - <%= watchers_checkboxes(@issue, @available_watchers) %> - -
    -
    + + <%#= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> + + + + + + <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb index 64e9f64d2..13baae37f 100644 --- a/app/views/layouts/_join_exit_project.html.erb +++ b/app/views/layouts/_join_exit_project.html.erb @@ -10,6 +10,6 @@ <% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %> <%= link_to "#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %> - <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> + <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> <% end %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 24f2c6ebf..d71722ce8 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -182,7 +182,7 @@

    <%= l(:label_project_overview)%>:

    -
    +
    <%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
    @@ -205,7 +205,7 @@
    - +
    <%= render_flash_messages %> @@ -213,7 +213,6 @@ <%= call_hook :view_layouts_base_content %>
    -
    <%= render :partial => 'layouts/new_footer'%> diff --git a/app/views/messages/_form_project.html.erb b/app/views/messages/_form_project.html.erb index 3e932b047..a1ef69fa9 100644 --- a/app/views/messages/_form_project.html.erb +++ b/app/views/messages/_form_project.html.erb @@ -26,7 +26,7 @@
  • - + <%= text_area :quote,:quote,:style => 'display:none' %> <%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
    diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb index 9a0694ea6..7f952cb3c 100644 --- a/app/views/projects/invite_members_by_mail.html.erb +++ b/app/views/projects/invite_members_by_mail.html.erb @@ -67,15 +67,16 @@ <%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %> -
    +
    -
    +
  • +
    <%= l(:label_send_email)%> - <%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %> + <% end %> diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 783c4a24d..aa188bd69 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -21,15 +21,14 @@ <% @project.repositories.sort.each do |repository| %> - <%= link_to repository.identifier, ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %> + <%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %> <%= checked_image repository.is_default? %> <%=h repository.scm_name %> <%if repository.scm_name=="Git"%> http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %> - <%=h repository.url.slice(project_path_cut, repository.url.length) %> + <%=h repository.url.slice(project_path_cut, repository.url.length) %>"> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%> <%else %> - <%=h repository.url %> + <%=h truncate(repository.url,:length=>10) %> <% end %> <% if repository.scm_name=="Git"%> diff --git a/app/views/projects/settings/_new_versions.html.erb b/app/views/projects/settings/_new_versions.html.erb index 7d513f192..6365354c3 100644 --- a/app/views/projects/settings/_new_versions.html.erb +++ b/app/views/projects/settings/_new_versions.html.erb @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + <% for version in @project.shared_versions.sort %> @@ -23,11 +23,11 @@ <%= 'shared' if version.project != @project %> <%= link_to_version version %> - +
    <%= l(:label_version) %> <%= l(:field_effective_date) %><%= l(:field_description) %> <%= l(:field_status) %><%= l(:field_sharing) %><%= l(:label_wiki_page) %><%= l(:label_version) %> <%= l(:field_effective_date) %><%= l(:field_description) %> <%= l(:field_status) %><%= l(:field_sharing) %><%= l(:label_wiki_page) %>
    <%= format_date(version.effective_date) %><%=h version.description %><%=h version.description %> <%= l("version_status_#{version.status}") %> - <%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki', + <%= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %> @@ -57,29 +57,29 @@
    • - + <%= f.text_field :name, :maxlength => 60, :required => true %>
    • - + <%= f.text_field :description, :maxlength => 60 %>
    • - + <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
    • - + <%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
    • - + <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %> <%= calendar_for('version_effective_date') %>
    • - + <%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
    • 保存 diff --git a/app/views/versions/_form.html.erb b/app/views/versions/_form.html.erb index 734fc459e..d9a02b8f1 100644 --- a/app/views/versions/_form.html.erb +++ b/app/views/versions/_form.html.erb @@ -3,29 +3,29 @@
      • - + <%= f.text_field :name, :maxlength => 60,:class=>" w280", :label => ""%>
      • - + <%= f.text_field :description, :maxlength => 60,:class=>" w280", :label => "" %>
      • - + <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
      • - + <%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
      • - - <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>'f1',:label => "" %> + + <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%> <%= calendar_for('version_effective_date') %>
      • - + <%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
      diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 9249130ee..1658339ec 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -42,7 +42,7 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} .box_main02{ width:390px; margin:15px auto;} .box_h3{ color:#15bccf; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} -.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} +.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:290px;} a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;} a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}