diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 41b9201ba..7e549509b 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -339,11 +339,8 @@ class ProjectsController < ApplicationController
end
# 邀请Trustie注册用户
- def invite_members_had_loged
+ def invite_members
@member ||= @project.members.new
- respond_to do |format|
- format.js
- end
end
def edit
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index f47ced545..971bf603d 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -31,7 +31,7 @@ module WatchersHelper
watched = objects.any? {|object| object.watched_by?(user)}
@watch_flag = (objects.first.instance_of?(User) or objects.first.instance_of?(Project) or objects.first.instance_of?(Contest) or (objects.first.instance_of?(Bid)))
- css = @watch_flag ? ([watcher_css(objects), watched ? 'icon ' : 'icon '].join(' ') << options[0].to_s) :
+ css = @watch_flag ? ([watcher_css(objects), watched ? 'icon ' : 'icon '].join(' ') << options[0].to_s) :
([watcher_css(objects), watched ? 'icon icon-fav ' : 'icon icon-fav-off '].join(' ') << options[0].to_s)
text = @watch_flag ?
@@ -283,6 +283,6 @@ module WatchersHelper
def exit_project_link(project)
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
- :remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px;margin-right:10px;height:20px;text-aligh:center;" )
+ :remote => true, :confirm => l(:lable_sure_exit_project), :style => "color: #fff; display:block; padding: 0px 5px;margin-right:10px;height:22px;background:none repeat scroll 0% 0% #64BDD9;TES" )
end
end
diff --git a/app/views/files/_newfile_index.html.erb b/app/views/files/_newfile_index.html.erb
deleted file mode 100644
index 5ffaacae4..000000000
--- a/app/views/files/_newfile_index.html.erb
+++ /dev/null
@@ -1,250 +0,0 @@
-
-
- <% if @isproject %>
- <%= render :partial => 'project_file', locals: {project: @project} %>
- <% else %>
- <%= render :partial => 'course_file', locals: {course: @course} %>
- <% end %>
-
-
-
-
-
-
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 39bc8b52e..4b6df47cb 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -1 +1,249 @@
-<%= render :partial => 'files/newfile_index' %>
\ No newline at end of file
+
+ <% if @isproject %>
+ <%= render :partial => 'project_file', locals: {project: @project} %>
+ <% else %>
+ <%= render :partial => 'course_file', locals: {course: @course} %>
+ <% end %>
+
+
+
+
+
+
diff --git a/app/views/files/index.js.erb b/app/views/files/index.js.erb
deleted file mode 100644
index 59bc2407f..000000000
--- a/app/views/files/index.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-alert("eeee");
-$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>');
diff --git a/app/views/issues/_newissue_index.html.erb b/app/views/issues/_newissue_index.html.erb
index f0b7c0108..b89ba41a2 100644
--- a/app/views/issues/_newissue_index.html.erb
+++ b/app/views/issues/_newissue_index.html.erb
@@ -4,13 +4,15 @@
<% if @project.enabled_modules.where("name = 'issue_tracking'").count > 0 %>
- <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
+ <% if User.current.member_of?(@project) %>
+ <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new,
:html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %>
+ <% end %>
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
:onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %>
<% end %>
- 问题总数:100 未解决:20
+ 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %>
<% if !@query.new_record? && @query.editable_by?(User.current) %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index fb8296f64..69abf79a6 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -1,5 +1,5 @@
-
问题跟踪
+ <%= l(:label_issue_plural) %>
<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
<% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index 2bc86d1ca..40f13a2f8 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -103,7 +103,11 @@
- 私有
+ 私有
+ <% end %>
+
<% if @project.project_type == 0 %>
@@ -125,13 +129,11 @@
邀请
- 发送邮件邀请新用户
- 邀请Trustie注册用户
+ <%= link_to "发送邮件邀请新用户" %>
+ <%= link_to "邀请Trustie注册用户", :controller=>"projects", :action=>"invite_members", :id => @project %>
- <%= link_to "动态", {:controller => 'projects', :action => 'show', :id => @project.id},
- :remote => "true",
- :style => "color:#3CA5C6" %>
+ <%= link_to "动态", {:controller => 'projects', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
<%= link_to "问题跟踪", project_issues_path(@project), :style => "color:#3CA5C6" %>(<%= @project.issues.count %>)
@@ -144,7 +146,7 @@
<%= link_to "讨论区", project_boards_path(@project), :style => "color:#3CA5C6" %>
(<%= @project.boards.first.topics.count %>)
<% if User.current.logged? && User.current.member_of?(@project) %>
- <%= link_to "+发贴", new_board_message_path(@project.boards.first, @project), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
+ <%= link_to "+发贴", new_board_message_path(@project.boards.first), :layout => 'base_projects',:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:4px;background:#28be6c;float:right;line-height:20px;" %>
<% end %>
diff --git a/app/views/memos/new.html.erb b/app/views/memos/new.html.erb
index 03a60044a..8bcb77a57 100644
--- a/app/views/memos/new.html.erb
+++ b/app/views/memos/new.html.erb
@@ -5,7 +5,7 @@
<% @nav_dispaly_forum_label = 1%>
<%= javascript_include_tag "ckeditor/ckeditor.js" %>
-
+
软件项目托管社区
@@ -19,7 +19,7 @@
<%= link_to request.host()+"/forums", forums_path %>
<%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name %>
-
+
<%=l(:label_memo_new)%>
diff --git a/app/views/projects/invite_members.html.erb b/app/views/projects/invite_members.html.erb
new file mode 100644
index 000000000..052ee92ef
--- /dev/null
+++ b/app/views/projects/invite_members.html.erb
@@ -0,0 +1,67 @@
+
+
邀请加入
+
+<%= error_messages_for 'member' %>
+<%
+ roles = Role.givable.all
+ if @project.project_type == Project::ProjectType_course
+ roles = roles[3..5]
+ else
+ roles = roles[0..2]
+ end
+ members = @project.member_principals.includes(:roles, :principal).all.sort
+%>
+
+
+
+
+
+
+
邀请Trustie注册用户
+ <% if roles.any? %>
+ <%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
+
+
+ <%= label_tag "principal_search", l(:label_principal_search) %>
+ <%= text_field_tag 'principal_search', nil %>
+ <%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
+
+
+ <%= render_principals_for_new_members(@project) %>
+
+
+ <%= l(:label_role_plural) %>:
+ <% roles.each do |role| %>
+
+ <%= check_box_tag 'membership[role_ids][]', role.id %>
+ <%= h role %>
+
+ <% end %>
+
+
+ <%= submit_tag l(:button_add), :id => 'member-add-submit', :style => 'display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;' %>
+
+ <% end %>
+ <% end %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 15c1338a2..0e4aca073 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -1,3 +1,6 @@
+
+
<%= l(:label_activity) %>
+
<%= javascript_include_tag "jquery.infinitescroll.js" %>