diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 031f78277..ef6e20644 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -45,11 +45,45 @@ class FilesController < ApplicationController 'filename' => "#{Attachment.table_name}.filename", 'size' => "#{Attachment.table_name}.filesize", 'downloads' => "#{Attachment.table_name}.downloads" + sort = "" if params[:project_id] @isproject = true - @containers = [ Project.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@project.id)] - @containers += @project.versions.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").all.sort + + if params[:sort] + params[:sort].split(",").each do |sort_type| + order_by = sort_type.split(":") + + case order_by[0] + when "filename" + attribute = "filename" + when "size" + attribute = "filesize" + when "attach_type" + attribute = "attachtype" + when "content_type" + attribute = "created_on" + when "field_file_dense" + attribute = "is_public" + when "downloads" + attribute = "downloads" + when "created_on" + attribute = "created_on" + end + + if order_by.count == 1 + sort += "#{Attachment.table_name}.#{attribute} desc " + elsif order_by.count == 2 + sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " + end + if sort_type != params[:sort].split(",").last + sort += "," + end + end + end + + @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)] + @containers += @project.versions.includes(:attachments).reorder(sort).all.sort show_attachments @containers @@ -57,7 +91,6 @@ class FilesController < ApplicationController elsif params[:course_id] @isproject = false - sort = "" if params[:sort] params[:sort].split(",").each do |sort_type| order_by = sort_type.split(":") diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1f6091f12..807d851be 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -737,7 +737,7 @@ module ApplicationHelper text = text.dup macros = catch_macros(text) - text = Redmine::WikiFormatting.to_html("CKEditor", text, :object => obj, :attribute => attr) + #text = Redmine::WikiFormatting.to_html("CKEditor", text, :object => obj, :attribute => attr) @parsed_headings = [] @heading_anchors = {} @@ -1555,6 +1555,25 @@ module ApplicationHelper date = time.strftime("%Y年%m月%d日") end + #当TAG数量过多时,更多链接 + #1代表是user类型 2代表是project类型 3代表是issue类型 4代表需求 9代表课程 + def more_tags id,object_flag + a= 1 + case object_flag + when "1" + s = link_to l(:label_more_tags),:controller => "users", :action => "show", :id => id + when "2" + s = link_to l(:label_more_tags),:controller => "projects", :action => "show", :id => id + when "3" + s = link_to l(:label_more_tags),:controller => "issues", :action => "show", :id => id + when "4" + s = link_to l(:label_more_tags),:controller => "bids", :action => "show", :id => id + when "9" + s = link_to l(:label_more_tags),:controller => "courses", :action => "show", :id => id + end + s + end + private def wiki_helper diff --git a/app/models/issue.rb b/app/models/issue.rb index 3a14d288d..6bbcd727f 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -240,11 +240,14 @@ class Issue < ActiveRecord::Base self.custom_field_values = issue.custom_field_values.inject({}) {|h,v| h[v.custom_field_id] = v.value; h} self.status = issue.status self.author = User.current - unless options[:attachments] == false - self.attachments = issue.attachments.map do |attachement| - attachement.copy(:container => self) - end - end + #赞不提供附件复制功能 + #unless options[:attachments] == false + #self.attachments = issue.attachments.map do |attachement| + # a = attachement.copy(:container => self) + # #a.save + # a + #end + #end @copied_from = issue @copy_options = options self diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 097539888..bb043cd70 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -4,7 +4,11 @@ <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%> <%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") + - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %> + if attachment.id.nil? + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, :class => 'is_public')%> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> diff --git a/app/views/attachments/autocomplete.js.erb b/app/views/attachments/autocomplete.js.erb index abe2c3757..691454feb 100644 --- a/app/views/attachments/autocomplete.js.erb +++ b/app/views/attachments/autocomplete.js.erb @@ -4,5 +4,5 @@ $('#relation_file').html('<%=render_attachments_for_new_project(@project, nil)%> <% elsif @course%> $('#relation_file').html('<%=render_attachments_for_new_course(@course, nil)%>'); <% end%> -$('#attachments').children().css("width","100%").css("word-break","break-all"); +$('#attachments').children().css("width","100%").css("word-break","break-all").css("word-wrap", "break-word"); diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index 186b85c69..6c23c638f 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -6,8 +6,9 @@

<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> (<%= number_to_human_size @attachment.filesize %>)    - <% if @attachment!=nil&&@attachment.container_type == 'Document'&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> - <%= link = link_to(l(:button_add), {:controller => 'code_review', + + <% if @attachment!=nil&&User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, @attachment.project) %> + <%= l(:review_assignments)+":" %><%= link = link_to(l(:button_add), {:controller => 'code_review', :action => 'assign', :action_type => 'attachment', :id=>@attachment.project, :change_id => '', :attachment_id => @attachment.id, diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 8cd46c35b..a14e32d6d 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -53,7 +53,7 @@ <% end %> -

+
<% if @topics.any? %> <% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %> -

<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}",:readonly => "readonly") %><%= calendar_for('bid_deadline')%> +

<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();") %><%= calendar_for('bid_deadline')%> + + +

<%= f.select :is_evaluation, is_evaluation_option %>

diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index b3fff9e5f..e339db2d7 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -1,9 +1,60 @@ + +

<%=l(:label_course_new_homework)%>

<%= labelled_form_for @homework, :url => {:controller => 'bids', :action => 'create_homework',:course_id => "#{params[:id] || params[:course_id]}"} do |f| %>
<%= render :partial => 'homework_form', :locals => { :f => f } %> - <%= submit_tag l(:button_create), :class => "enterprise" %> + <%= javascript_tag "$('#bid_name').focus();" %> <% end %>
\ No newline at end of file diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 366ec0c39..ff0a3e6e1 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -29,7 +29,7 @@ <%= l(:label_new_activity) %> - <%= link_to "#{eventToLanguageCourse(e.event_type, @course)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : e.event_url,:style => "word-break:break-all;" %> + <%= link_to "#{eventToLanguageCourse(e.event_type, @course)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : e.event_url,:style => "word-break:break-all;word-wrap: break-word;" %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 616e2323d..d65a93c6c 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -37,12 +37,9 @@ <% end -%>
    -
    -
    - <%= textilizable issue, :description %> -
    - -
    +
    + <%= textilizable issue, :description %> +
    <% unless issue.assigned_to_id.nil? %> diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 9f0743a18..4b0140b1c 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -11,8 +11,9 @@ <% if @copy_from && @copy_from.attachments.any? %>

    - - <%= check_box_tag 'copy_attachments', '1', @copy_attachments %> + +

    <% end %> <% if @copy_from && !@copy_from.leaf? %> diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index 6e67f0544..237cfea4f 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -1,7 +1,7 @@

    <%=h @issue.tracker %> #<%= @issue.id %>

    <%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %>

    -
    +
    <%= simple_format_without_paragraph @diff.to_html %>
    diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 01510865b..4554b0466 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -191,7 +191,7 @@
    <% if @course.description && @course.description.size>0 %> -
    +
    <%= textilizable @course.description %>
    diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index c3ad0fe08..a3b8e267c 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -112,7 +112,7 @@
    -
    +
    <%= textilizable @project.description %>
    diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index de10036de..380481fe2 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -116,7 +116,7 @@

    <% end %> <% unless @user.user_extensions.nil? %> -

    +

    <%= @user.user_extensions.brief_introduction %>

    <% end %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 76e4990a5..9b68e80fc 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -46,7 +46,7 @@
    -
    <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
    +
    <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
    <%= textAreailizable(@memo,:content) %>

    diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index c543601d3..aba16d620 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -156,7 +156,7 @@ -

    +
    <%= textAreailizable message,:content,:attachments => message.attachments %> <%#= message.content.html_safe %>
    diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb index a8def56f5..047f7d660 100644 --- a/app/views/messages/_form.html.erb +++ b/app/views/messages/_form.html.erb @@ -27,14 +27,15 @@


    <%# modify by nwb%> <% if @message.project %> - <%= f.select :board_id, boards_options_for_select(@message.project.boards) %>

    + <%= f.select :board_id, boards_options_for_select(@message.project.boards) %> <% elsif @message.course %> - <%= f.select :board_id, boards_options_for_select(@message.course.boards) %>

    + <%= f.select :board_id, boards_options_for_select(@message.course.boards) %> <% end %> +

    <% end %> -
    - - <%= text_area :quote,:quote,:style => 'display:none' %> +

    + <%= text_area :quote,:quote,:style => 'display:none' %> +

    <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %> <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>

    diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index 7f88816f5..ddb23fc95 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -37,6 +37,7 @@ background-color: #F6F6F6; white-space: normal; word-break: break-all; + word-wrap: break-word; /*word-wrap: break-word;*/ } .memo-timestamp { @@ -94,7 +95,7 @@ <%= link_to @topic.author, user_path(@topic.author) %>

    -
    +
    <% if @project %> <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %> @@ -161,7 +162,7 @@ -
    +
    <%= textAreailizable message,:content,:attachments => message.attachments %> <%#= message.content.html_safe %>
    diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index 62d29ebd8..3d4b6a4d2 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -4,7 +4,7 @@ <%= course_board_breadcrumb(@message) %> <% end %> -

    <%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %>

    +

    <%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %>

    <%= form_for @message, { :as => :message, diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index f92559903..35d8da952 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -3,9 +3,11 @@ <%= @project ? l(:label_news_new) : l(:bale_news_notice) %>
    -

    <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>

    +

    <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onblur => "regexTitle();" %>

    +

    (60个字符以内)

    -

    <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %>

    +

    <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onblur => "regexDescription();" %>

    +

    <%= render :partial => 'attachments/form', :locals => {:container => @news} %>

    diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index cdef33e34..e9a912c5c 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -1,3 +1,56 @@ + + <% if @project.project_type == Project::ProjectType_course btn_tips = l(:label_news_notice) @@ -22,7 +75,9 @@ <%= labelled_form_for @news, :url => project_news_index_path(@project), :html => {:id => 'news-form', :multipart => true} do |f| %> <%= render :partial => 'news/form', :locals => {:f => f} %> - <%= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> | + <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> + <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :class => 'whiteButton m3p10' %> + | <%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %> | <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %> diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index c8a8c5767..ecae672b6 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -1,3 +1,55 @@ +
    <%= watcher_link(@news, User.current) %> <%= link_to(l(:button_edit), @@ -15,9 +67,10 @@ <%= labelled_form_for :news, @news, :url => news_path(@news), :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> - <%= submit_tag l(:button_save) %> - <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => ''} %> | - <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %> + <%#= submit_tag l(:button_save) %> + <%= link_to l(:button_save), "#", :onclick => 'submitNews();',:class => 'whiteButton m3p10' %> + <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> | + <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %> <% end %>
    diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 47e3e8419..a08577c80 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -7,7 +7,7 @@ <% @events_by_day.keys.sort.reverse.each do |day| %> <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%> -
    +
    <%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %>
    @@ -24,7 +24,7 @@ <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> -
    +
    <%= textAreailizable e,:event_description %> <%#= h(truncate(strip_tags(e.event_description).gsub(/ /, ' '), length: 30, omission: '...')) %>
    diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index 01889f1f3..6996e8891 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -22,7 +22,7 @@ <% i += 1 %> <% end %> - <%= link_to l(:label_more_tags),:controller => "tags", :action => "show", :id => obj.id %> + <%= more_tags(obj.id,object_flag)%> <% else %> diff --git a/app/views/users/_course_form.html.erb b/app/views/users/_course_form.html.erb index 055dd7d6b..892c2775e 100644 --- a/app/views/users/_course_form.html.erb +++ b/app/views/users/_course_form.html.erb @@ -30,7 +30,7 @@ - +

    <%= textilizable membership.course.short_description %>

    diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 984cdf352..f16e6d397 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -20,27 +20,18 @@

    - <% unless user.memberships.empty? %> - <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %> - <% memberships = user.memberships.all(:conditions => cond) %> - <%= l(:label_x_contribute_to, :count => memberships.count) %> - <% for member in memberships %> - <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> - <% end %> - <% else %> - <%= l(:label_x_contribute_to, :count => 0) %> + <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %> + <% memberships = user.memberships.all(:conditions => cond) %> + <%= l(:label_x_contribute_to, :count => memberships.count) %> + <% for member in memberships %> + <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> <% end %>

    - <% unless user.memberships.empty? %> - <% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %> - <% memberships = user.memberships.all(:conditions => cond) %> - <%= l(:label_x_course_contribute_to, :count => memberships.count) %> - <% for member in memberships %> - <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> - <% end %> - <% else %> - <%= l(:label_x_course_contribute_to, :count => 0) %> + <% user_courses = user_courses_list(user) %> + <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> + <% for course in user_courses %> + <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %> <% end %>

    diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index a1597e270..b312ed0d4 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -28,7 +28,7 @@ <%= l(:label_peoject_take_in) %> <%= link_to_project(membership.project) %> - +

    <%= membership.project.short_description%>

    diff --git a/app/views/users/user_watchlist.html.erb b/app/views/users/user_watchlist.html.erb index bc4a655d8..e58e35d27 100644 --- a/app/views/users/user_watchlist.html.erb +++ b/app/views/users/user_watchlist.html.erb @@ -7,31 +7,32 @@ <%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %> - + diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 30395aa6f..69b272002 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -158,7 +158,7 @@
    <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %> -
  • +
  • <%= image_tag('/images/contest1.png')%>
    @@ -197,7 +197,7 @@ <%#= link_to l(:label_more_information), forums_path %>
    -
    <%= @contestNotification.title %>
    +
    <%= @contestNotification.title %>
    diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 997b583c3..d91019e53 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -66,7 +66,7 @@ <% #projects = find_miracle_project(10, 3) %> <% @projects.map do |project| %> -
  • +
  • <%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
    diff --git a/app/views/wiki/diff.html.erb b/app/views/wiki/diff.html.erb index ef26c570c..c50051d20 100644 --- a/app/views/wiki/diff.html.erb +++ b/app/views/wiki/diff.html.erb @@ -22,6 +22,6 @@ %>, <%= format_time(@diff.content_to.updated_on) %>)

    -
    +
    <%= simple_format_without_paragraph @diff.to_html %>
    diff --git a/config/locales/en.yml b/config/locales/en.yml index ddae72799..89898409e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1808,4 +1808,5 @@ en: label_company_name: Company Name notice_account_invalid_creditentials_new: You have not to the mailbox activation lable_unknow_type: Unknow type - lable_score_less_than_zero: Score less than 0, revised to 0 \ No newline at end of file + lable_score_less_than_zero: Score less than 0, revised to 0 + review_assignments: review assignments \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 2fb7ef2bf..54585e314 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -276,6 +276,7 @@ zh: field_is_default: 默认值 field_tracker: 跟踪 field_subject: 主题 + field_quote: 描述 field_due_date: 计划完成日期 field_assigned_to: 指派给 field_priority: 优先级 @@ -2116,4 +2117,5 @@ zh: lable_forums_max_length: 贴吧描述最大长度为65535个字符 lable_unknow_type: 未知类型 lable_score_less_than_zero: 得分小于0,修正为0 + review_assignments: 评审任务 \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index b4dab9094..1307dd913 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -441,10 +441,10 @@ ActiveRecord::Schema.define(:version => 20140826072838) do t.datetime "updated_at", :null => false t.string "page_type" t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 t.integer "show_course", :default => 1 t.integer "show_contest", :default => 1 + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 end create_table "forums", :force => true do |t| @@ -898,18 +898,18 @@ ActiveRecord::Schema.define(:version => 20140826072838) do create_table "relative_memos", :force => true do |t| t.integer "osp_id" t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false t.integer "author_id" - t.integer "replies_count", :default => 0 + t.integer "replies_count", :default => 0 t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 t.string "url" t.string "username" t.string "userhomeurl" @@ -933,6 +933,19 @@ ActiveRecord::Schema.define(:version => 20140826072838) do add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + create_table "roles", :force => true do |t| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1 diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css index 29c90a673..403e4184f 100644 --- a/public/stylesheets/scm.css +++ b/public/stylesheets/scm.css @@ -97,7 +97,7 @@ table.annotate td.author { background: inherit; } -table.annotate td.line-code { background-color: #fafafa; } +table.annotate td.line-code { background-color: #fafafa; word-break: break-all;} div.action_M { background: #fd8 } div.action_D { background: #f88 }
  • <%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %> + <%= content_tag "div", link_to(user.name,user_path(user)), :class => "project_avatar_name" %>

    - <% unless user.memberships.empty? %> + <%# unless user.memberships.empty? %> <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %> <% memberships = user.memberships.all(:conditions => cond) %> <%= l(:label_x_contribute_to, :count => memberships.count) %> <% for member in memberships %> <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> <% end %> - <% end %> + <%# end %>

    - <% unless user.memberships.empty? %> - <% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %> - <% memberships = user.memberships.all(:conditions => cond) %> - <%= l(:label_x_course_contribute_to, :count => memberships.count) %> - <% for member in memberships %> - <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> - <% end %> - <% end %> + <%# unless user.memberships.empty? %> + <% user_courses = user_courses_list(user) %> + <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> + <% for course in user_courses %> + <%# if course.name != nil %> + <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.course_domain} %><%= (user_courses.last == course) ? '' : ',' %> + <%# end %> + <% end %> + <%# end %>

    -