<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'add_brief_introdution'}) do |f|%>
-
-
<%= f.text_area 'user_introduction', :rows => 3,
:cols => 65,
@@ -109,9 +103,7 @@
<% end %>
-
-
@@ -126,9 +118,7 @@
|
<%= l(:label_user_mail) %> |
-
-
<% unless @user.user_extensions.nil? %>
<% unless @user.user_extensions.identity == 2 %>
diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb
index f76ffc94c..e9ba11db2 100644
--- a/app/views/words/_message.html.erb
+++ b/app/views/words/_message.html.erb
@@ -25,19 +25,22 @@
<%= l :label_comment_time %>: <%= format_time journal.created_on %> |
- <% if @user == User.current %>
- <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
- :method => 'post', :title => l(:button_quote))%>
- <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user},
- :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %> |
- <% else %>
- <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
- :method => 'post', :title => l(:button_quote))%>
+
+ <% if @user == User.current %>
+ <% ids = 'project_respond_form_'+ journal.id.to_s%>
+ <%= toggle_link l(:label_projects_feedback_respond), ids, {:focus => 'project_respond'} %>
<% end %>
+ |
+
style="display: none;width: 80%; margin: auto;">
+ <%= render :partial => 'words/new_respond', :locals => {:journal => journal} %>
+
+
+ <%= render :partial => 'words/journal_reply', :locals => {:journal => journal} %>
+
<% end %>
<% end %>
diff --git a/app/views/words/_new_respond.html.erb b/app/views/words/_new_respond.html.erb
new file mode 100644
index 000000000..6ef2c9cb1
--- /dev/null
+++ b/app/views/words/_new_respond.html.erb
@@ -0,0 +1,8 @@
+<%= form_tag({:controller => 'words',
+:action => 'create_reply'}) do %>
+<%= text_area_tag 'project_respond', "", :class => 'noline', :required => true, :style => "resize: none;", :rows => 4, :placeholder => l(:label_projects_feedback_respond_content) %>
+
+<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
+<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "bid_btn", :style => "margin-top: 1px;"%>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/words/new.js.erb b/app/views/words/new.js.erb
index e08615fc1..b7c2d6295 100644
--- a/app/views/words/new.js.erb
+++ b/app/views/words/new.js.erb
@@ -1,3 +1,4 @@
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => @content})) %>');
$('#new_form_reference_user_id').val("<%= @id %>");
showAndScrollTo("pre_show", "new_form_user_message");
+
diff --git a/config/routes.rb b/config/routes.rb
index d4d9b4f92..6b5edb16d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -452,6 +452,7 @@ RedmineApp::Application.routes.draw do
post 'words/new', :to => 'words#new'
post 'words/create', :to => 'words#create'
post 'words/append', :to => 'words#append'
+ post 'words/create_reply', :to => 'words#create_reply'
delete 'words/destroy', :to => 'words#destroy'
get 'words/more', :to => 'words#more'
get 'words/back', :to=> 'words#back'
diff --git a/db/migrate/20131224021723_add_missing_attribute_to_journals_for_messages.rb b/db/migrate/20131224021723_add_missing_attribute_to_journals_for_messages.rb
new file mode 100644
index 000000000..3b492922a
--- /dev/null
+++ b/db/migrate/20131224021723_add_missing_attribute_to_journals_for_messages.rb
@@ -0,0 +1,8 @@
+class AddMissingAttributeToJournalsForMessages < ActiveRecord::Migration
+ def change
+ add_column :journals_for_messages, :m_parent_id, :string
+ add_column :journals_for_messages, :is_readed, :boolean
+ add_column :journals_for_messages, :m_reply_count, :int
+ add_column :journals_for_messages, :m_reply_id, :int
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 7690b922f..58713ce4b 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,15 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20131215065910) do
+ActiveRecord::Schema.define(:version => 20131224021723) do
+
+ create_table "a_user_watchers", :force => true do |t|
+ t.string "name"
+ t.text "description"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "member_id"
+ end
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -294,9 +302,9 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
create_table "issue_relations", :force => true do |t|
- t.integer "issue_from_id", :null => false
- t.integer "issue_to_id", :null => false
- t.string "relation_type", :default => "", :null => false
+ t.integer "issue_from_id", :null => false
+ t.integer "issue_to_id", :null => false
+ t.string "relation_type", :null => false
t.integer "delay"
end
@@ -401,8 +409,12 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.text "notes"
t.integer "status"
t.integer "reply_id"
- t.datetime "created_on", :null => false
- t.datetime "updated_on", :null => false
+ t.datetime "created_on", :null => false
+ t.datetime "updated_on", :null => false
+ t.string "m_parent_id"
+ t.boolean "is_readed"
+ t.integer "m_reply_count"
+ t.integer "m_reply_id"
end
create_table "member_roles", :force => true do |t|
@@ -460,6 +472,22 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
add_index "messages", ["parent_id"], :name => "messages_parent_id"
+ create_table "messages_for_bids", :force => true do |t|
+ t.string "message"
+ t.integer "user_id"
+ t.integer "bid_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "messages_for_users", :force => true do |t|
+ t.integer "messager_id"
+ t.integer "user_id"
+ t.string "message"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "news", :force => true do |t|
t.integer "project_id"
t.string "title", :limit => 60, :default => "", :null => false
@@ -489,6 +517,23 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.string "salt", :null => false
end
+ create_table "permissions", :force => true do |t|
+ t.string "controller", :limit => 30, :default => "", :null => false
+ t.string "action", :limit => 30, :default => "", :null => false
+ t.string "description", :limit => 60, :default => "", :null => false
+ t.boolean "is_public", :default => false, :null => false
+ t.integer "sort", :default => 0, :null => false
+ t.boolean "mail_option", :default => false, :null => false
+ t.boolean "mail_enabled", :default => false, :null => false
+ end
+
+ create_table "permissions_roles", :id => false, :force => true do |t|
+ t.integer "permission_id", :default => 0, :null => false
+ t.integer "role_id", :default => 0, :null => false
+ end
+
+ add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
+
create_table "praise_tread_caches", :force => true do |t|
t.integer "object_id", :null => false
t.string "object_type"
@@ -519,11 +564,22 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.integer "watchers_count"
t.integer "project_id"
t.integer "project_type"
- t.float "grade", :default => 0.0
- t.integer "course_ac_para", :default => 0
+ t.integer "gitlab_group_id", :limit => 8
+ t.float "grade", :default => 0.0
+ t.integer "course_ac_para", :default => 0
end
- add_index "project_statuses", ["grade"], :name => "index_project_statuses_on_grade"
+ add_index "project_statuses", ["changesets_count"], :name => "index_project_statuses_on_changesets_count"
+ add_index "project_statuses", ["watchers_count"], :name => "index_project_statuses_on_watchers_count"
+
+ create_table "project_tags", :force => true do |t|
+ t.integer "project_id"
+ t.integer "tag_id"
+ t.string "description"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "user_id"
+ end
create_table "projects", :force => true do |t|
t.string "name", :default => "", :null => false
@@ -568,18 +624,28 @@ ActiveRecord::Schema.define(:version => 20131215065910) 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 "reply_for_journals", :force => true do |t|
+ t.integer "jour_id"
+ t.integer "user_id"
+ t.text "notes"
+ t.integer "status"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "repositories", :force => true do |t|
- t.integer "project_id", :default => 0, :null => false
- t.string "url", :default => "", :null => false
- t.string "login", :limit => 60, :default => ""
- t.string "password", :default => ""
- t.string "root_url", :default => ""
+ t.integer "project_id", :default => 0, :null => false
+ t.string "url", :default => "", :null => false
+ t.string "login", :limit => 60, :default => ""
+ t.string "password", :default => ""
+ t.string "root_url", :default => ""
t.string "type"
- t.string "path_encoding", :limit => 64
- t.string "log_encoding", :limit => 64
+ t.string "path_encoding", :limit => 64
+ t.string "log_encoding", :limit => 64
t.text "extra_info"
t.string "identifier"
- t.boolean "is_default", :default => false
+ t.boolean "is_default", :default => false
+ t.string "git_project_id"
end
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
@@ -593,26 +659,6 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.string "issues_visibility", :limit => 30, :default => "default", :null => false
end
- create_table "seems_rateable_cached_ratings", :force => true do |t|
- t.integer "cacheable_id", :limit => 8
- t.string "cacheable_type"
- t.float "avg", :null => false
- t.integer "cnt", :null => false
- t.string "dimension"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "seems_rateable_rates", :force => true do |t|
- t.integer "rater_id", :limit => 8
- t.integer "rateable_id"
- t.string "rateable_type"
- t.float "stars", :null => false
- t.string "dimension"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
create_table "settings", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "value"
@@ -623,9 +669,9 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
create_table "shares", :force => true do |t|
t.date "created_on"
- t.string "url"
t.string "title"
- t.integer "share_type"
+ t.string "share_type"
+ t.string "url"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "project_id"
@@ -633,6 +679,12 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.string "description"
end
+ create_table "students", :force => true do |t|
+ t.string "name"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "students_for_courses", :force => true do |t|
t.integer "student_id"
t.integer "course_id"
@@ -691,7 +743,7 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
create_table "tokens", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.string "action", :limit => 30, :default => "", :null => false
- t.string "value", :limit => 40, :default => "", :null => false
+ t.string "value", :limit => 40
t.datetime "created_on", :null => false
end
@@ -717,12 +769,13 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
- t.string "technical_title"
t.integer "identity"
+ t.string "technical_title"
t.string "student_id"
t.string "teacher_realname"
t.string "student_realname"
t.string "location_city"
+ t.string "git_token"
end
create_table "user_grades", :force => true do |t|
@@ -759,6 +812,14 @@ ActiveRecord::Schema.define(:version => 20131215065910) do
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
+ create_table "user_tags", :force => true do |t|
+ t.integer "user_id"
+ t.integer "tag_id"
+ t.string "description"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "users", :force => true do |t|
t.string "login", :default => "", :null => false
t.string "hashed_password", :limit => 40, :default => "", :null => false