parent
5191411508
commit
b9ea3e589e
|
@ -2,6 +2,7 @@
|
|||
<launchConfiguration type="com.aptana.js.debug.core.webbrowserLaunchConfigurationType">
|
||||
<booleanAttribute key="advancedRunEnabled" value="false"/>
|
||||
<booleanAttribute key="appendProjectName" value="true"/>
|
||||
<stringAttribute key="browserCmdLine" value=""/>
|
||||
<stringAttribute key="browserExecutable" value=""/>
|
||||
<stringAttribute key="browserNature" value="Firefox"/>
|
||||
<stringAttribute key="externalBaseUrl" value=""/>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<launchConfiguration type="com.aptana.js.debug.core.webbrowserLaunchConfigurationType">
|
||||
<booleanAttribute key="advancedRunEnabled" value="false"/>
|
||||
<booleanAttribute key="appendProjectName" value="true"/>
|
||||
<stringAttribute key="browserCmdLine" value=""/>
|
||||
<stringAttribute key="browserExecutable" value="C:\Program Files (x86)\Internet Explorer\iexplore.exe"/>
|
||||
<stringAttribute key="browserNature" value="Internet Explorer"/>
|
||||
<stringAttribute key="externalBaseUrl" value=""/>
|
||||
|
|
|
@ -275,7 +275,12 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
end
|
||||
def auth_login1(token = params[:token])
|
||||
if(!User.current.logged? && !token.nil?)
|
||||
|
||||
User.current =try_to_autologin1
|
||||
end
|
||||
end
|
||||
def authorize_allowed(ctrl = params[:controller], action = params[:action], global = false)
|
||||
#modify by NWB
|
||||
if @project
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
class MyController < ApplicationController
|
||||
layout "users_base"
|
||||
# edit
|
||||
before_filter :auth_login1, :only => [:account]
|
||||
#
|
||||
before_filter :require_login
|
||||
|
||||
helper :issues
|
||||
|
|
|
@ -31,14 +31,16 @@ class ProjectsController < ApplicationController
|
|||
menu_item :feedback, :only => :feedback
|
||||
menu_item l(:label_course_file), :only => :index
|
||||
menu_item l(:label_course_news), :only => :index
|
||||
|
||||
|
||||
# edit
|
||||
before_filter :authorize1, :only => [:show]
|
||||
#
|
||||
before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches]
|
||||
# before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file,
|
||||
# :statistics, :feedback, :course, :enterprise_course, :course_enterprise, :project_respond, :share,
|
||||
# :show_projects_score, :issue_score_index, :news_score_index, :file_score_index, :code_submit_score_index, :projects_topic_score_index]
|
||||
#此条勿删 课程相关权限 ,:new_homework,:homework,:feedback,,:member
|
||||
before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
|
||||
before_filter :authorize, :only => [:settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
|
||||
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
||||
before_filter :file, :statistics, :watcherlist
|
||||
|
|
|
@ -29,6 +29,9 @@ class UsersController < ApplicationController
|
|||
|
||||
#Ended by young
|
||||
|
||||
# edit
|
||||
before_filter :auth_login1, :only => [:show]
|
||||
#
|
||||
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
||||
before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :tag_saveEx,:user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info,
|
||||
:user_watchlist, :user_fanslist,:update, :user_courses, :user_homeworks, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
|
|
|
@ -109,9 +109,14 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
token = Token.new(:user => User.find_by_mail(recipients), :action => 'autologin')
|
||||
token.save
|
||||
@token = token
|
||||
@token = token
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :token => @token.value)
|
||||
|
||||
# edit
|
||||
@issue_author_url = url_for(:controller => 'users', :action => 'show', :id => issue.author_id, :token => @token.value)
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
||||
@user_url = url_for(:controller => 'my', :action => 'account', :user => User.find_by_mail(recipients) , :token => @token.value)
|
||||
#
|
||||
|
||||
cc = issue.watcher_recipients - issue.recipients
|
||||
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||
|
|
|
@ -1,33 +1,46 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Trustie项目邮件</title>
|
||||
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 0.8em;
|
||||
color:#484848;
|
||||
}
|
||||
h1, h3, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0px; }
|
||||
h1 { font-size: 1.2em; }
|
||||
h3, h3 { font-size: 1.1em; }
|
||||
a, a:link, a:visited { color: #2A5685;}
|
||||
a:hover, a:active { color: #c61a1a; }
|
||||
a.wiki-anchor { display: none; }
|
||||
hr {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: #ccc;
|
||||
border: 0;
|
||||
}
|
||||
.footer {
|
||||
/*font-size: 0.8em;*/
|
||||
/*font-style: italic;*/
|
||||
}
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ margin:0; padding:0;}
|
||||
div,img,tr,td,table{ border:0;}
|
||||
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
|
||||
ol,ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
a:hover{ text-decoration:underline; }
|
||||
|
||||
.mail{ width:600px; margin:20px; height:auto; color:#4b4b4b; font-size:14px; }
|
||||
.mail a{color:#1b55a7; font-weight: bold; }
|
||||
.mail_content{ margin-top:30px;}
|
||||
.c_blue{ color:#1b55a7;}
|
||||
.mail_box{ border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;}
|
||||
.mail_box_p{ float:left; display: block; width:527px;}
|
||||
a.mail_reply{ display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px;}
|
||||
a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
|
||||
.mail_fujian{ float:left; width:527px; display: block; }
|
||||
.mail_fujian a{ font-weight:normal; font-size:12px;}
|
||||
.mail_foot a{ font-size:12px; font-weight:normal;}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<span class="header"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_header).html_safe %></span>
|
||||
<%= yield %>
|
||||
<hr />
|
||||
<span class="footer"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></span>
|
||||
<div class="container">
|
||||
<div class="mail">
|
||||
<div class="mail_head">
|
||||
<p>亲爱的Trustie用户,您好!</p>
|
||||
</div><!--mail_head end-->
|
||||
<%= yield %>
|
||||
<hr />
|
||||
<div class="mail_foot"><%= link_to("退订该邮件?", @user_url) %> </div><!--mail_foot end-->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,39 @@
|
|||
<h1><%= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1>
|
||||
|
||||
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
|
||||
<p>
|
||||
<span class="c_blue">
|
||||
<%= link_to(h("#{@issue.author}(#{@issue.author.show_name})"), @issue_author_url) %>
|
||||
</span>在
|
||||
<span class="c_blue"><%= link_to(h("#{@issue.project.name}"),@project_url) %></span>中有了一个与您相关的最新活动,请您关注!</p>
|
||||
<div class="mail_box">
|
||||
<ul>
|
||||
<li><%=l(:field_author)%>: <%=h issue.author %></li>
|
||||
<li><%=l(:field_status)%>: <%=h issue.status %></li>
|
||||
<li><%=l(:field_priority)%>: <%=h issue.priority %></li>
|
||||
<li><%=l(:field_assigned_to)%>: <%=h issue.assigned_to %></li>
|
||||
<li><%=l(:field_category)%>: <%=h issue.category %></li>
|
||||
<li><%=l(:field_fixed_version)%>: <%=h issue.fixed_version %></li>
|
||||
<% issue.custom_field_values.each do |c| %>
|
||||
<li><%=h c.custom_field.name %>: <%=h show_value(c) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<li><strong>标题:</strong><%= link_to(issue.subject, issue_url) %></li>
|
||||
<li><strong>来源:</strong><%= link_to(h("#{issue.project.name}"),@project_url) %><b>| </b>项目缺陷</li>
|
||||
<li><strong style="float:left;">内容:</strong>
|
||||
<p class="mail_box_p"><%= textilizable(issue, :description, :only_path => false) %></p>
|
||||
</li>
|
||||
<li><strong style="float:left;">附件:</strong>
|
||||
<p class="mail_fujian">
|
||||
<% unless @issue.attachments.nil? %>
|
||||
<% @issue.attachments.each do |attach| %>
|
||||
<%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false) %><%= l(:label_added) %></br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= textilizable(issue, :description, :only_path => false) %>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<label class="mail_reply"><%= link_to( "我要回复", issue_url) %></label>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!-- <li><%#=l(:field_author)%>: <%#=h issue.author %></li>
|
||||
|
||||
<li><%#=l(:field_status)%>: <%#=h issue.status %></li>
|
||||
<li><%#=l(:field_priority)%>: <%#=h issue.priority %></li>
|
||||
<li><%#=l(:field_assigned_to)%>: <%#=h issue.assigned_to %></li>
|
||||
<li><%#=l(:field_category)%>: <%#=h issue.category %></li>
|
||||
<li><%#=l(:field_fixed_version)%>: <%#=h issue.fixed_version %></li>
|
||||
-->
|
||||
<%# issue.custom_field_values.each do |c| %>
|
||||
<!-- <li><%#=h c.custom_field.name %>: <%#=h show_value(c) %></li>
|
||||
<%#end %>
|
||||
-->
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
<div class="mail_content">
|
||||
|
||||
|
||||
<%= l(:text_issue_added, :id => "##{@issue.project_index}", :author => h(@issue.author)) %>
|
||||
<ul>
|
||||
<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
|
||||
<% unless @issue.attachments.nil? %>
|
||||
<% @issue.attachments.each do |attach| %>
|
||||
<li> <%= l(:label_attachment) %><%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false) %><%= l(:label_added) %></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
|
@ -1,11 +1,11 @@
|
|||
<%= l(:text_issue_added, :id => "##{@issue.project_index}", :author => @issue.author) %>
|
||||
|
||||
<%= link_to(h("#{@issue.author}"+"(#{@issue.author_id.firstname+@issue.author_id.lastname})"), @issue_author_url) %>在<%= link_to(h("#{@issue.project.name}"),@project_url) %>
|
||||
<%#= l(:text_issue_added, :id => "##{@issue.project_index}", :author => @issue.author) %> !-->
|
||||
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
<% @issue.attachments.each do |attach| %>
|
||||
<%= l(:label_attachment) %>
|
||||
<%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false) %> <%= l(:label_added) %>
|
||||
<% end %>
|
||||
|
||||
----------------------------------------
|
||||
|
||||
<%= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
<%= link_to( "我要回复", @issue_url) %>
|
||||
<%#= render :partial => 'issue', :formats => [:text], :locals => { :issue => @issue, :issue_url => @issue_url } %>
|
||||
|
||||
|
|
Loading…
Reference in New Issue