This commit is contained in:
sw 2015-01-13 16:36:29 +08:00
commit c856005803
5 changed files with 26 additions and 19 deletions

View File

@ -41,7 +41,7 @@ class UsersController < ApplicationController
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index]
before_filter :auth_user_extension, only: :show
before_filter :rest_user_score, only: :show
#before_filter :rest_user_score, only: :show
#before_filter :select_entry, only: :user_projects
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx

View File

@ -62,7 +62,7 @@ function f_submit()
<style type="text/css">
/*浮窗*/
body{ height:3000px; font-family:'微软雅黑';}
div,ul,li,body,h3,p{margin:0; padding:0;}
a{ text-decoration:none;}
#roll{ background:url(/images/f_opnion.jpg) 0 0 no-repeat;width:157px; height:332px; position:absolute;}
.opnionBox{ width: 130px; height:146px; margin:76px auto 20px; }
@ -101,10 +101,10 @@ a:hover.opnionButton{ text-decoration:underline;}
<% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<div class="actions" style="max-width:680px">
<p>
<p style="margin:0; padding:0;">
<%= f.text_area :subject, :class => "opnionText",:placeholder => "有什么想说的,尽管来咆哮吧~~"%>
</p>
<p>
<p style="margin:0; padding:0;">
<%= f.hidden_field :content, :required => true ,:value=>'该贴来自用户反馈!'%>
</p>
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>

View File

@ -123,7 +123,7 @@
<br/>
</p>
<p style="width:400px;padding-left: 52px;">
<p style="width:400px;padding-left: 50px;">
<label style="margin-right: 1px;">
<%= l(:label_identity) %><span style="color: #bb0000;"> *</span></label>
<select onchange="showtechnical_title(this.value, $('#userTechnical_title'));" name="identity" id="userIdentity" class="location" style="margin: 0px;">
@ -187,13 +187,13 @@
<!-- added by bai 增加账户里的性别-->
<span id='gender' style='display:none'>
<% if @user.user_extensions.nil? %>
<p style="width:400px;padding-left: 54px;">
<p style="width:400px;padding-left: 52px;">
<%= l(:label_gender) %>&nbsp;&nbsp;
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe, :class => 'gender' %>
</p>
<% else %>
<% if @user.user_extensions.gender == 0 %><!-- label_gender_male -->
<p style="width:400px;padding-left: 54px;">
<p style="width:400px;padding-left: 52px;">
<%= l(:label_gender) %>&nbsp;&nbsp;
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe, :class => 'gender' %>
</p>
@ -318,7 +318,7 @@
});
</script>
<p style="width:400px;padding-left: 57px;"><label style="margin-right: 5px;"><%= l(:label_location) %></label>
<p style="width:400px;padding-left: 55px;"><label style="margin-right: 5px;"><%= l(:label_location) %></label>
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince" class="location">
<option value="">--请选择省份--</option>
<option value="北京">北京</option>
@ -382,7 +382,7 @@
<legend onclick="toggleFieldset(this);">
<%= l(:field_mail_notification) %>
</legend>
<div style="padding-left: 26px;"> <!-- modified by ming -->
<div style="padding-left: 8px;"> <!-- modified by ming -->
<p style="width:380px;">
<%= render :partial => 'users/mail_notifications' %>
</p></div>

View File

@ -87,12 +87,12 @@ default:
address: smtp.qq.com
port: 587
domain: smtp.qq.com
address: smtp.126.com
port: 25
domain: smtp.126.com
authentication: :plain
user_name: 939547590@qq.com
password: 'suwen11223344'
user_name: "alanlong9278@126.com"
password: "alanlong8788786"
# Absolute path to the directory where attachments are stored.
# The default is the 'files' directory in your Redmine instance.

View File

@ -91,12 +91,19 @@ module Redmine
ActiveSupport::Deprecation.warn "acts_as_activity_provider with implicit :permission option is deprecated. Add a visible scope to the #{self.name} model or use explicit :permission option."
scope = scope.scoped(:conditions => Project.allowed_to_condition(user, "view_#{self.name.underscore.pluralize}".to_sym, options))
end
to = scope.select(:created_on).order("created_on desc").first.created_on
if options[:course]
from = (to - days) > created_time ? (to - days) : created_time.to_date
else
from = to - days -1.years
unless scope.all(provider_options[:find_options].dup).first.nil?
if provider_options[:timestamp].include? "updated_on"
to = scope.scoped(:order => "#{provider_options[:timestamp]} desc").all(provider_options[:find_options].dup).first.updated_on
else
to = scope.scoped(:order => "#{provider_options[:timestamp]} desc").all(provider_options[:find_options].dup).first.created_on
end
if options[:course]
from = (to - days.days) > created_time ? (to - days.days) : created_time.to_date
else
from = to - days.days - 1.years
end
end
if from && to
scope = scope.scoped(:conditions => ["#{provider_options[:timestamp]} BETWEEN ? AND ?", from, to])
end