diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a70488618..51c209e9d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -173,6 +173,7 @@ class ProjectsController < ApplicationController @project.safe_attributes = params[:project] @project.organization_id = params[:organization_id] @project.user_id = User.current.id + @project.project_new_type = 1 if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4c3f08fe4..34bb4680e 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后需要进行资源记录的更新 @@ -325,6 +335,20 @@ module ApplicationHelper :title => attachment.filename end + def thumbnail_issue_tag(attachment) + imagesize = attachment.thumbnail(:size => "50*50") + imagepath = named_attachment_path(attachment, attachment.filename) + if imagesize + link_to image_tag(imagesize), + imagepath, + :title => attachment.filename + else + link_to image_tag(imagepath , height: '73', width: '100'), + imagepath, + :title => attachment.filename + end + end + # 图片缩略图链接 def thumbnail_small_tag(attachment) imagesize = attachment.thumbnail(:size => "200*200") diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 54cef5c7a..9c4fab9de 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -340,9 +340,9 @@ module IssuesHelper if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) # Link to the attachment if it has not been removed if options[:token].nil? - value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) + value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :class=> "info_foot_num c_blue") else - value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token]) + value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token], :class=> "info_foot_num c_blue") end if options[:only_path] != false && atta.is_text? value += link_to( diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index d32025787..d8b53acd0 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -5,7 +5,7 @@ <%if is_float%>
<% end%> - + <% if options[:length] %> <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%> <% else %> @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, <%= format_time(attachment.created_on) %> <% end %> @@ -62,11 +62,9 @@ <% if defined?(thumbnails) && thumbnails %> <% images = attachments.select(&:thumbnailable?) %> <% if images.any? %> -
<% images.each do |attachment| %> -
<%= thumbnail_tag(attachment) %>
+
<%= thumbnail_issue_tag(attachment) %>
<% end %> -
<% end %> <% end %>
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index fa16fcb51..43cea4b4f 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -45,14 +45,14 @@
-
<%= l(:label_project_board_count , :count => @topic_count)%>
+
<%= l(:label_project_board_count , :count => @topic_count)%>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <%= link_to l(:project_module_boards_post), new_board_message_path(@board), :class => 'problem_new_btn fl c_dorange', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> <% end %> -
-
+
+ <% if @topics.any? %> <% @topics.each do |topic| %> @@ -67,7 +67,7 @@ <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %>  <%= l(:label_post_by_time)%><%= format_time topic.created_on %> - <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;line-height: 18px;" %> + <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %>
<% end %> diff --git a/app/views/files/_project_file_new.html.erb b/app/views/files/_project_file_new.html.erb index 0ec274ee8..ad489742e 100644 --- a/app/views/files/_project_file_new.html.erb +++ b/app/views/files/_project_file_new.html.erb @@ -11,7 +11,7 @@ showModal('ajax-modal', '513px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("") - $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().css("top","40%").css("left","30%"); $('#ajax-modal').parent().addClass("popbox_polls"); } diff --git a/app/views/files/quote_resource_show_project.js.erb b/app/views/files/quote_resource_show_project.js.erb index 440004357..d1a44e90f 100644 --- a/app/views/files/quote_resource_show_project.js.erb +++ b/app/views/files/quote_resource_show_project.js.erb @@ -7,5 +7,5 @@ showModal('ajax-modal', '513px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before(""); -$('#ajax-modal').parent().css("top","").css("left",""); +$('#ajax-modal').parent().css("top","30%").css("left","35%"); $('#ajax-modal').parent().addClass("popbox_polls"); \ No newline at end of file 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/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 5efa3a3f4..4ce029217 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -8,7 +8,8 @@ <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }), - {:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :no_label => true}, + {:no_label => true}, + :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :class => "w150" %> <% else %> <%= h(@issue.status.name) %> @@ -36,8 +37,8 @@
  • - <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> + <%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true}, :class => "w150" %> @@ -92,7 +93,8 @@
  • <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %> <%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }), - {:required => @issue.required_attribute?('done_ratio'), :no_label => true, :onchange => "PrecentChange(this.value)"}, + {:required => @issue.required_attribute?('done_ratio'), :no_label => true}, + :onchange => "PrecentChange(this.value)", :class => "w150" %> <% end %>
  • diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index 5ce65ab12..1266f4611 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -5,9 +5,9 @@ <% if @edit_allowed || !@allowed_statuses.empty? %> <% end %>
    @@ -18,7 +18,7 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <% end %> -
    说明 +
    回复 <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
    @@ -29,7 +29,7 @@ - +
    diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 3afc47c20..5679c92d4 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -4,12 +4,12 @@