- <%= l(:label_task_plural)%>(<%= @homework_list.count%>) |
+ <%= l(:label_task_plural)%>(<%= @homework_list.count%>)
+ <%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(
+ User.current.admin? ||
+ !(User.current.roles_for_project(@bid.courses.first).map(&:id) & ([7,9])).empty? ) ||
+ (Rails.env.development?) %>
+ |
<% if is_teacher %>
@@ -17,10 +22,6 @@
<% end %>
<% display_id = im_watching_student_id? @bid%>
-<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;display: inline-block;" if(
- User.current.admin? ||
- !(User.current.roles_for_project(@bid.courses.first).map(&:id) & ([7,9])).empty? ) ||
- (Rails.env.development?) %>
<% @homework_list.each do |homework|%>
<% if homework.attachments.any?%>
diff --git a/app/views/bids/show_project.html.erb b/app/views/bids/show_project.html.erb
index 02ef72e7c..c14d2e14c 100644
--- a/app/views/bids/show_project.html.erb
+++ b/app/views/bids/show_project.html.erb
@@ -1,110 +1,71 @@
-
-
<% if @bid.homework_type == Bid::HomeworkFile %>
- <%= render :partial => 'homework' %>
-
+ <%= render :partial => 'homework' %>
+
<% else %>
-
-
- <% if User.current.logged? %>
-
-
-
- <% end %>
-
- <%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project,:bid => @bid} %>
-
+ function cancel() {
+ $("#put-bid-form").hide();
+ }
+
+ <% if User.current.logged? %>
+
+
+
+ <% end %>
+
+ <%= render :partial => 'project_list', :locals => {:bidding_project => @bidding_project, :bid => @bid} %>
+
<% end %>
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 6aef01e1d..f4857bd22 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -2,7 +2,7 @@
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e7d24c329..d84cfb664 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -147,6 +147,8 @@ en:
general_pdf_encoding: UTF-8
general_first_day_of_week: '7'
+ label_approve: Approve
+ label_refusal: Refusal
notice_account_updated: Account was successfully updated.
notice_account_invalid_creditentials: Invalid user or password
notice_account_password_updated: Password was successfully updated.
@@ -1166,6 +1168,7 @@ en:
label_tags_issue_description: issue description
label_tags_all_objects: all objects
label_apply_project: Apply Project
+ label_apply_project_waiting: "Application has been submitted, please wait for administrator review."
label_unapply_project: Unsubscribe
#fq
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 8c89eab78..b03e3bc31 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -155,6 +155,9 @@ zh:
general_pdf_encoding: gb18030
general_first_day_of_week: '7'
+ label_approve: 批准
+ label_refusal: 拒绝
+
notice_account_updated: 帐号更新成功
notice_account_invalid_creditentials: 无效的用户名或密码
notice_account_invalid_creditentials_new: 您还未到邮箱激活
@@ -480,7 +483,7 @@ zh:
label_project_latest: 最近的项目
label_issue: 问题
label_issue_new: 新建问题
- label_issue_plural: 缺陷 #问题 #nyan
+ label_issue_plural: 缺陷
label_issue_view_all: 查看所有问题
label_issues_by: "按 %{value} 分组显示问题"
label_issue_added: 问题已添加
@@ -758,7 +761,7 @@ zh:
label_sort_higher: 上移
label_sort_lower: 下移
label_sort_lowest: 置底
- label_roadmap: 里程碑 #版本路线图 #nyan
+ label_roadmap: 里程碑 #版本路线图
label_roadmap_due_in: "截止日期到 %{value}"
label_roadmap_overdue: "%{value} 延期"
label_roadmap_no_issues: 该版本没有问题
@@ -1262,9 +1265,9 @@ zh:
setting_default_projects_tracker_ids: Default trackers for new projects
label_total_time: 合计
label_create_time: 创建时间 #Customer added!Added by nie
- label_comment_time: 留言时间 #nyan
- label_activity_time: 发布时间 #nyan
- label_update_time: 更新时间 #nyan
+ label_comment_time: 留言时间
+ label_activity_time: 发布时间
+ label_update_time: 更新时间
label_current_contributors: 位当前贡献者
label_commit_limit: 作业提交时间已过!
label_commit_ar: 作业提交截止时间快到了!
@@ -1332,6 +1335,7 @@ zh:
label_tags_issue_description: 问题描述
label_tags_all_objects: 所有
label_apply_project: 申请加入
+ label_apply_project_waiting: 已处理申请,请等待管理员审核
label_unapply_project: 取消申请
#fq
diff --git a/config/routes.rb b/config/routes.rb
index ea678e231..dbbc544ac 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -301,6 +301,7 @@ RedmineApp::Application.routes.draw do
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
collection do
get 'autocomplete'
+ get 'appliedproject'
end
end
diff --git a/db/migrate/20140401004102_create_relative_memos.rb b/db/migrate/20140401004102_create_relative_memos.rb
index 6654b8fe5..6f0d776db 100644
--- a/db/migrate/20140401004102_create_relative_memos.rb
+++ b/db/migrate/20140401004102_create_relative_memos.rb
@@ -1,10 +1,10 @@
class CreateRelativeMemos < ActiveRecord::Migration
def change
create_table :relative_memos do |t|
- t.integer :osp_id, :null => false
+ t.integer :osp_id, :null => true
t.integer :parent_id, null: true
t.string :subject, null: false
- t.text :content, null: false
+ t.mediumtext :content, null: false
t.integer :author_id
t.integer :replies_count, default: 0
t.integer :last_reply_id
diff --git a/db/migrate/20140516031200_create_relative_memo_to_open_source_projects.rb b/db/migrate/20140516031200_create_relative_memo_to_open_source_projects.rb
new file mode 100644
index 000000000..492577c6c
--- /dev/null
+++ b/db/migrate/20140516031200_create_relative_memo_to_open_source_projects.rb
@@ -0,0 +1,10 @@
+class CreateRelativeMemoToOpenSourceProjects < ActiveRecord::Migration
+ def change
+ create_table :relative_memo_to_open_source_projects do |t|
+ t.integer :osp_id
+ t.integer :relative_memo_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e2afdaae2..51246fb0b 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140521072851) do
+ActiveRecord::Schema.define(:version => 20140519074133) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -23,9 +23,9 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
- create_table "applied_projects", :force => true do |t|
- t.integer "project_id", :null => false
- t.integer "user_id", :null => false
+ create_table "andoidcontests", :force => true do |t|
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "apply_project_masters", :force => true do |t|
@@ -57,14 +57,11 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type"
add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on"
- create_table "attachmentstypes", :id => false, :force => true do |t|
- t.integer "id", :null => false
- t.integer "typeId"
+ create_table "attachmentstypes", :force => true do |t|
+ t.integer "typeId", :null => false
t.string "typeName", :limit => 50
end
- add_index "attachmentstypes", ["id"], :name => "id"
-
create_table "auth_sources", :force => true do |t|
t.string "type", :limit => 30, :default => "", :null => false
t.string "name", :limit => 60, :default => "", :null => false
@@ -623,6 +620,14 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade"
+ create_table "projecting_softapplictions", :force => true do |t|
+ t.integer "user_id"
+ t.integer "softapplication_id"
+ t.integer "project_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "projects", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "description"
@@ -638,6 +643,7 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
t.boolean "inherit_members", :default => false, :null => false
t.integer "project_type"
t.boolean "hidden_repo", :default => false, :null => false
+ t.integer "user_id"
t.integer "attachmenttype", :default => 1
end
@@ -667,6 +673,13 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
add_index "queries", ["project_id"], :name => "index_queries_on_project_id"
add_index "queries", ["user_id"], :name => "index_queries_on_user_id"
+ create_table "relative_memo_to_open_source_projects", :force => true do |t|
+ t.integer "osp_id"
+ t.integer "relative_memo_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "relative_memos", :force => true do |t|
t.integer "osp_id", :null => false
t.integer "parent_id"
@@ -774,7 +787,7 @@ ActiveRecord::Schema.define(:version => 20140521072851) do
t.integer "softapplication_id"
t.integer "is_public"
t.string "application_developers"
- t.string "deposit_project_url"
+ t.string "deposit_project"
end
create_table "students_for_courses", :force => true do |t|
diff --git a/public/javascripts/hubspot/messenger-theme-future.js b/public/javascripts/hubspot/messenger-theme-future.js
new file mode 100644
index 000000000..41f4ea40b
--- /dev/null
+++ b/public/javascripts/hubspot/messenger-theme-future.js
@@ -0,0 +1,33 @@
+(function() {
+ var $, FutureMessage, spinner_template,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+ $ = jQuery;
+
+ spinner_template = '\n \n \n \n \n \n \n ';
+
+ FutureMessage = (function(_super) {
+
+ __extends(FutureMessage, _super);
+
+ function FutureMessage() {
+ return FutureMessage.__super__.constructor.apply(this, arguments);
+ }
+
+ FutureMessage.prototype.template = function(opts) {
+ var $message;
+ $message = FutureMessage.__super__.template.apply(this, arguments);
+ $message.append($(spinner_template));
+ return $message;
+ };
+
+ return FutureMessage;
+
+ })(window.Messenger.Message);
+
+ window.Messenger.themes.future = {
+ Message: FutureMessage
+ };
+
+}).call(this);
diff --git a/public/javascripts/hubspot/messenger.min.js b/public/javascripts/hubspot/messenger.min.js
new file mode 100644
index 000000000..79828950a
--- /dev/null
+++ b/public/javascripts/hubspot/messenger.min.js
@@ -0,0 +1,2 @@
+/*! messenger 1.4.1 */
+(function(){var e,t=window.Messenger;e=window.Messenger=function(){return e._call.apply(this,arguments)},window.Messenger.noConflict=function(){return window.Messenger=t,e}})(),window.Messenger._=function(){if(window._)return window._;var e=Array.prototype,t=Object.prototype,n=Function.prototype,s=(e.push,e.slice),r=(e.concat,t.toString);t.hasOwnProperty;var o=e.forEach,i=(e.map,e.reduce,e.reduceRight,e.filter),a=(e.every,e.some,e.indexOf,e.lastIndexOf,Array.isArray,Object.keys),l=n.bind,u={},c={},h=u.each=u.forEach=function(e,t,n){if(null!=e)if(o&&e.forEach===o)e.forEach(t,n);else if(e.length===+e.length){for(var s=0,r=e.length;r>s;s++)if(t.call(n,e[s],s,e)===c)return}else for(var i in e)if(u.has(e,i)&&t.call(n,e[i],i,e)===c)return};u.result=function(e,t){if(null==e)return null;var n=e[t];return u.isFunction(n)?n.call(e):n},u.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}};var p=0;return u.uniqueId=function(e){var t=++p+"";return e?e+t:t},u.filter=u.select=function(e,t,n){var s=[];return null==e?s:i&&e.filter===i?e.filter(t,n):(h(e,function(e,r,o){t.call(n,e,r,o)&&(s[s.length]=e)}),s)},h(["Arguments","Function","String","Number","Date","RegExp"],function(e){u["is"+e]=function(t){return r.call(t)=="[object "+e+"]"}}),u.defaults=function(e){return h(s.call(arguments,1),function(t){if(t)for(var n in t)null==e[n]&&(e[n]=t[n])}),e},u.extend=function(e){return h(s.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},u.keys=a||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)u.has(e,n)&&(t[t.length]=n);return t},u.bind=function(e,t){if(e.bind===l&&l)return l.apply(e,s.call(arguments,1));var n=s.call(arguments,2);return function(){return e.apply(t,n.concat(s.call(arguments)))}},u.isObject=function(e){return e===Object(e)},u}(),window.Messenger.Events=function(){if(window.Backbone&&Backbone.Events)return Backbone.Events;var e=function(){var e=/\s+/,t=function(t,n,s,r){if(!s)return!0;if("object"==typeof s)for(var o in s)t[n].apply(t,[o,s[o]].concat(r));else{if(!e.test(s))return!0;for(var i=s.split(e),a=0,l=i.length;l>a;a++)t[n].apply(t,[i[a]].concat(r))}},n=function(e,t){var n,s=-1,r=e.length;switch(t.length){case 0:for(;r>++s;)(n=e[s]).callback.call(n.ctx);return;case 1:for(;r>++s;)(n=e[s]).callback.call(n.ctx,t[0]);return;case 2:for(;r>++s;)(n=e[s]).callback.call(n.ctx,t[0],t[1]);return;case 3:for(;r>++s;)(n=e[s]).callback.call(n.ctx,t[0],t[1],t[2]);return;default:for(;r>++s;)(n=e[s]).callback.apply(n.ctx,t)}},s={on:function(e,n,s){if(!t(this,"on",e,[n,s])||!n)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:n,context:s,ctx:s||this}),this},once:function(e,n,s){if(!t(this,"once",e,[n,s])||!n)return this;var r=this,o=_.once(function(){r.off(e,o),n.apply(this,arguments)});return o._callback=n,this.on(e,o,s),this},off:function(e,n,s){var r,o,i,a,l,u,c,h;if(!this._events||!t(this,"off",e,[n,s]))return this;if(!e&&!n&&!s)return this._events={},this;for(a=e?[e]:_.keys(this._events),l=0,u=a.length;u>l;l++)if(e=a[l],r=this._events[e]){if(i=[],n||s)for(c=0,h=r.length;h>c;c++)o=r[c],(n&&n!==o.callback&&n!==o.callback._callback||s&&s!==o.context)&&i.push(o);this._events[e]=i}return this},trigger:function(e){if(!this._events)return this;var s=Array.prototype.slice.call(arguments,1);if(!t(this,"trigger",e,s))return this;var r=this._events[e],o=this._events.all;return r&&n(r,s),o&&n(o,arguments),this},listenTo:function(e,t,n){var s=this._listeners||(this._listeners={}),r=e._listenerId||(e._listenerId=_.uniqueId("l"));return s[r]=e,e.on(t,"object"==typeof t?this:n,this),this},stopListening:function(e,t,n){var s=this._listeners;if(s){if(e)e.off(t,"object"==typeof t?this:n,this),t||n||delete s[e._listenerId];else{"object"==typeof t&&(n=this);for(var r in s)s[r].off(t,n,this);this._listeners={}}return this}}};return s.bind=s.on,s.unbind=s.off,s};return e()}(),function(){var e,t,n,s,r,o,i,a,l,u,c,h={}.hasOwnProperty,p=function(e,t){function n(){this.constructor=e}for(var s in t)h.call(t,s)&&(e[s]=t[s]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},d=[].slice,f=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e=jQuery,o=null!=(l=window._)?l:window.Messenger._,s=null!=(u="undefined"!=typeof Backbone&&null!==Backbone?Backbone.Events:void 0)?u:window.Messenger.Events,n=function(){function t(t){e.extend(this,s),o.isObject(t)&&(t.el&&this.setElement(t.el),this.model=t.model),this.initialize.apply(this,arguments)}return t.prototype.setElement=function(t){return this.$el=e(t),this.el=this.$el[0]},t.prototype.delegateEvents=function(e){var t,n,s,r,i,a,l;if(e||(e=o.result(this,"events"))){this.undelegateEvents(),t=/^(\S+)\s*(.*)$/,l=[];for(s in e){if(i=e[s],o.isFunction(i)||(i=this[e[s]]),!i)throw Error('Method "'+e[s]+'" does not exist');r=s.match(t),n=r[1],a=r[2],i=o.bind(i,this),n+=".delegateEvents"+this.cid,""===a?l.push(this.jqon(n,i)):l.push(this.jqon(n,a,i))}return l}},t.prototype.jqon=function(e,t,n){var s;return null!=this.$el.on?(s=this.$el).on.apply(s,arguments):(null==n&&(n=t,t=void 0),null!=t?this.$el.delegate(t,e,n):this.$el.bind(e,n))},t.prototype.jqoff=function(e){var t;return null!=this.$el.off?(t=this.$el).off.apply(t,arguments):(this.$el.undelegate(),this.$el.unbind(e))},t.prototype.undelegateEvents=function(){return this.jqoff(".delegateEvents"+this.cid)},t.prototype.remove=function(){return this.undelegateEvents(),this.$el.remove()},t}(),i=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return p(n,t),n.prototype.defaults={hideAfter:10,scroll:!0,closeButtonText:"×"},n.prototype.initialize=function(t){return null==t&&(t={}),this.shown=!1,this.rendered=!1,this.messenger=t.messenger,this.options=e.extend({},this.options,t,this.defaults)},n.prototype.show=function(){var e;return this.rendered||this.render(),this.$message.removeClass("messenger-hidden"),e=this.shown,this.shown=!0,e?void 0:this.trigger("show")},n.prototype.hide=function(){var e;if(this.rendered)return this.$message.addClass("messenger-hidden"),e=this.shown,this.shown=!1,e?this.trigger("hide"):void 0},n.prototype.cancel=function(){return this.hide()},n.prototype.update=function(t){var n,s=this;return o.isString(t)&&(t={message:t}),e.extend(this.options,t),this.lastUpdate=new Date,this.rendered=!1,this.events=null!=(n=this.options.events)?n:{},this.render(),this.actionsToEvents(),this.delegateEvents(),this.checkClickable(),this.options.hideAfter?(this.$message.addClass("messenger-will-hide-after"),null!=this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(function(){return s.hide()},1e3*this.options.hideAfter)):this.$message.removeClass("messenger-will-hide-after"),this.options.hideOnNavigate?(this.$message.addClass("messenger-will-hide-on-navigate"),null!=("undefined"!=typeof Backbone&&null!==Backbone?Backbone.history:void 0)&&Backbone.history.on("route",function(){return s.hide()})):this.$message.removeClass("messenger-will-hide-on-navigate"),this.trigger("update",this)},n.prototype.scrollTo=function(){return this.options.scroll?e.scrollTo(this.$el,{duration:400,offset:{left:0,top:-20}}):void 0},n.prototype.timeSinceUpdate=function(){return this.lastUpdate?new Date-this.lastUpdate:null},n.prototype.actionsToEvents=function(){var e,t,n,s,r=this;n=this.options.actions,s=[];for(t in n)e=n[t],s.push(this.events['click [data-action="'+t+'"] a']=function(e){return function(n){return n.preventDefault(),n.stopPropagation(),r.trigger("action:"+t,e,n),e.action.call(r,n,r)}}(e));return s},n.prototype.checkClickable=function(){var e,t,n,s;n=this.events,s=[];for(t in n)e=n[t],"click"===t?s.push(this.$message.addClass("messenger-clickable")):s.push(void 0);return s},n.prototype.undelegateEvents=function(){var e;return n.__super__.undelegateEvents.apply(this,arguments),null!=(e=this.$message)?e.removeClass("messenger-clickable"):void 0},n.prototype.parseActions=function(){var t,n,s,r,o,i;n=[],o=this.options.actions;for(r in o)t=o[r],s=e.extend({},t),s.name=r,null==(i=s.label)&&(s.label=r),n.push(s);return n},n.prototype.template=function(t){var n,s,r,o,i,a,l,u,c,h,p=this;for(i=e(""),t.showCloseButton&&(r=e(' |