缺陷修改
This commit is contained in:
parent
e95581eab7
commit
1e945cd02a
|
@ -500,8 +500,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def
|
||||
course
|
||||
def course
|
||||
@school_id = params[:school_id]
|
||||
per_page_option = 10
|
||||
if @school_id == "0" or @school_id.nil?
|
||||
|
|
|
@ -13,44 +13,6 @@ class ForumsController < ApplicationController
|
|||
include SortHelper
|
||||
|
||||
PageLimit = 20
|
||||
def create_feedback
|
||||
if User.current.logged?
|
||||
@memo = Memo.new(params[:memo])
|
||||
@memo.forum_id = "1"
|
||||
@memo.author_id = User.current.id
|
||||
#@forum = @memo.forum
|
||||
respond_to do |format|
|
||||
if @memo.save
|
||||
format.html { redirect_to forum_path(@memo.forum) }
|
||||
else
|
||||
sort_init 'updated_at', 'desc'
|
||||
sort_update 'created_at' => "#{Memo.table_name}.created_at",
|
||||
'replies' => "#{Memo.table_name}.replies_count",
|
||||
'updated_at' => "COALESCE (last_replies_memos.created_at, #{Memo.table_name}.created_at)"
|
||||
|
||||
@topic_count = @forum.topics.count
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
@memos = @forum.topics.
|
||||
reorder("#{Memo.table_name}.sticky DESC").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
order(sort_clause).
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
|
||||
flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
|
||||
# back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
|
||||
format.html { render action: :show, layout: 'base_forums' }#, error: "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" }
|
||||
format.json { render json: @memo.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { redirect_to signin_path }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create_memo
|
||||
@memo = Memo.new(params[:memo])
|
||||
|
@ -87,15 +49,16 @@ class ForumsController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def index
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@forums_all = Forum.reorder("sticky DESC")
|
||||
@forums_count = @forums_all.count
|
||||
@forums_pages = Paginator.new @forums_count, @limit, params['page']
|
||||
|
||||
|
||||
@offset ||= @forums_pages.offset
|
||||
@forums = @forums_all.offset(@offset).limit(@limit).all
|
||||
@forums = @forums_all.offset(@offset).limit(@limit).all
|
||||
#@forums = Forum.all
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
|
@ -123,12 +86,14 @@ class ForumsController < ApplicationController
|
|||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
|
||||
|
||||
|
||||
# @offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
# @forum = Forum.find(params[:id])
|
||||
# @memos_all = @forum.topics
|
||||
# @topic_count = @memos_all.count
|
||||
# @topic_pages = Paginator.new @topic_count, @limit, params['page']
|
||||
|
||||
|
||||
# @offset ||= @topic_pages.offset
|
||||
# @memos = @memos_all.offset(@offset).limit(@limit).all
|
||||
respond_to do |format|
|
||||
|
@ -211,6 +176,7 @@ class ForumsController < ApplicationController
|
|||
@forums_count = @forums_all.count
|
||||
@forums_pages = Paginator.new @forums_count, @limit, params['page']
|
||||
|
||||
|
||||
@offset ||= @forums_pages.offset
|
||||
@forums = @forums_all.offset(@offset).limit(@limit).all
|
||||
respond_to do |format|
|
||||
|
@ -231,7 +197,7 @@ class ForumsController < ApplicationController
|
|||
@memos_all = @forum.topics.where("subject LIKE ?", q)
|
||||
@topic_count = @memos_all.count
|
||||
@topic_pages = Paginator.new @topic_count, @limit, params['page']
|
||||
|
||||
|
||||
@offset ||= @topic_pages.offset
|
||||
@memos = @memos_all.offset(@offset).limit(@limit).all
|
||||
respond_to do |format|
|
||||
|
@ -239,17 +205,20 @@ class ForumsController < ApplicationController
|
|||
render 'show', :layout => 'base_forums'
|
||||
}
|
||||
format.json { render json: @forum }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
|
||||
|
||||
def find_forum_if_available
|
||||
@forum = Forum.find(params[:id]) if params[:id]
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def authenticate_user_edit
|
||||
find_forum_if_available
|
||||
|
|
|
@ -150,7 +150,6 @@ class MyController < ApplicationController
|
|||
File.delete(diskfile1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Destroys user's account
|
||||
|
|
|
@ -129,7 +129,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show_new_score
|
||||
render :layout => 'users_base'
|
||||
render :layout => false
|
||||
end
|
||||
# end
|
||||
|
||||
|
@ -188,9 +188,9 @@ class UsersController < ApplicationController
|
|||
for user in @watcher
|
||||
events << Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 30)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@events_by_day = events.group_by(&:event_date)
|
||||
|
||||
unless User.current.admin?
|
||||
|
|
|
@ -75,21 +75,16 @@ class ZipdownController < ApplicationController
|
|||
|
||||
def zip_homework_by_user(homeattach)
|
||||
homeworks_attach_path = []
|
||||
not_exist_file = []
|
||||
# 需要将所有homework.attachments遍历加入zip
|
||||
# 并且返回zip路径
|
||||
homeattach.attachments.each do |attach|
|
||||
if File.exist?(attach.diskfile)
|
||||
homeworks_attach_path << attach.diskfile
|
||||
else
|
||||
not_exist_file << attach.filename
|
||||
end
|
||||
homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1)
|
||||
end
|
||||
zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{((homeattach.user.user_extensions.nil? || homeattach.user.user_extensions.student_id.nil?) ? "" : homeattach.user.user_extensions.student_id)}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true, not_exist_file)
|
||||
zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{((homeattach.user.user_extensions.nil? || homeattach.user.user_extensions.student_id.nil?) ? "" : homeattach.user.user_extensions.student_id)}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true)
|
||||
end
|
||||
|
||||
|
||||
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
|
||||
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false)
|
||||
# 输入待打包的文件列表,已经打包文件定位到ouput_path
|
||||
ic = Iconv.new('GBK//IGNORE', 'UTF-8//IGNORE')
|
||||
input_filename = files_paths
|
||||
|
@ -106,11 +101,9 @@ class ZipdownController < ApplicationController
|
|||
|
||||
zipfile.add(rename_file, filename)
|
||||
end
|
||||
unless not_exist_file.empty?
|
||||
zipfile.get_output_stream('FILE_LOST.txt') do |os|
|
||||
os.write l(:label_file_lost) + not_exist_file.join(',').to_s
|
||||
end
|
||||
end
|
||||
#zipfile.get_output_stream('ReadMe') do |os|
|
||||
# os.write 'Homeworks'
|
||||
#end
|
||||
end
|
||||
zipfile_name
|
||||
rescue Errno => e
|
||||
|
@ -126,4 +119,4 @@ class ZipdownController < ApplicationController
|
|||
attach = Attachment.find_by_disk_filename(name)
|
||||
attach.filename
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -492,7 +492,7 @@ module ApplicationHelper
|
|||
def principals_check_box_tags_ex(name, principals)
|
||||
s = ''
|
||||
principals.each do |principal|
|
||||
s << "<label>#{ check_box_tag name, principal.id, false, :id => nil } #{h principal.userInfo }</label>\n"
|
||||
s << "<label>#{ check_box_tag name, principal.id, false, :id => nil } #{h link_to principal.userInfo, { :controller=> 'users', :action => 'show', :id => principal.id }}</lable>\n"
|
||||
end
|
||||
s.html_safe
|
||||
end
|
||||
|
@ -1593,12 +1593,6 @@ module ApplicationHelper
|
|||
end
|
||||
s
|
||||
end
|
||||
|
||||
def get_memo
|
||||
@new_memo = Memo.new
|
||||
#@new_memo.subject = "有什么想说的,尽管来咆哮吧~~"
|
||||
@public_forum = Forum.find(1)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ module CoursesHelper
|
|||
|
||||
# 返回教师数量,即roles表中定义的Manager
|
||||
def teacherCount project
|
||||
project.members.count - studentCount(project).to_i
|
||||
searchTeacherAndAssistant(project).count
|
||||
# or
|
||||
# searchTeacherAndAssistant(project).count
|
||||
end
|
||||
|
@ -114,7 +114,7 @@ module CoursesHelper
|
|||
# 学生人数计算
|
||||
# add by nwb
|
||||
def studentCount course
|
||||
course.student.count.to_s#course.student.count
|
||||
searchStudent(course).count.to_s#course.student.count
|
||||
end
|
||||
|
||||
#课程成员数计算
|
||||
|
|
|
@ -38,7 +38,7 @@ class Course < ActiveRecord::Base
|
|||
|
||||
validates_presence_of :password, :term,:name
|
||||
validates_format_of :class_period, :with =>/^[1-9]\d*$/
|
||||
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
|
||||
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
|
||||
validates_length_of :description, :maximum => 10000
|
||||
before_save :self_validate
|
||||
after_create :create_board_sync
|
||||
|
|
|
@ -77,13 +77,6 @@ class User < Principal
|
|||
has_many :homework_attaches, :through => :homework_users
|
||||
has_many :homework_evaluations
|
||||
|
||||
#问卷相关关关系
|
||||
has_many :poll_users, :dependent => :destroy
|
||||
has_many :poll_votes, :dependent => :destroy
|
||||
has_many :poll, :dependent => :destroy #用户创建的问卷
|
||||
has_many :answers, :source => :poll, :through => :poll_users, :dependent => :destroy #用户已经完成问答的问卷
|
||||
# end
|
||||
|
||||
has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
|
||||
:after_remove => Proc.new {|user, group| group.user_removed(user)}
|
||||
has_many :changesets, :dependent => :nullify
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<td class="location-list">
|
||||
<strong><%= l(:label_user_location) %> :</strong>
|
||||
</td>
|
||||
<td rowspan="2" valign="bottom">
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
<% unless User.current.user_extensions.identity == 1 %>
|
||||
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add', :target => "_blank") %>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<%= l(:label_tags_course_name) %>
|
||||
<span class="required">* </span>
|
||||
</label>
|
||||
<input id="course_name" type="text" value="<%= @course.name %>" style="width:490px;size:60;" name = "course[name]" maxlength="100">
|
||||
<input id="course_name" type="text" value="<%= @course.name %>" style="width:490px; size:60;" name = "course[name]" maxlength="100">
|
||||
</p>
|
||||
|
||||
<%= f.fields_for @course do |m| %>
|
||||
|
@ -38,11 +38,11 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold; margin-left:19px">
|
||||
<%= l(:label_class_period) %>
|
||||
<span class="required"> * </span>
|
||||
</span>
|
||||
<span class="info" style="width: 10px;">
|
||||
<span class="info" style="width: 10px; margin-left: 2px;" >
|
||||
<%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %>
|
||||
</span>
|
||||
<span>
|
||||
|
@ -59,15 +59,15 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ; margin-left:22px;">
|
||||
<%= l(:label_class_period) %>
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ; margin-left:22px;">
|
||||
<%= l(:label_class_period) %>
|
||||
<span class="required">
|
||||
*
|
||||
</span>
|
||||
</span>
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
|
||||
<span class="info" align="right" style="width: 90px; font-weight: bold ; margin-left:22px;">
|
||||
<%= l(:label_class_period) %>
|
||||
<span class="required">
|
||||
*
|
||||
|
@ -116,9 +116,9 @@
|
|||
<%= l(:label_new_course_password) %>
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
<input id="course_course_password" type="text" style="width:488px;margin-left: 10px;" value="<%= @course.password %>" size="60" name="course[password]"/>
|
||||
<input id="course_course_password" type="text" style="width:488px; margin-left: 10px;" value="<%= @course.password %>" size="60" name="course[password]"/>
|
||||
</p>
|
||||
<em class="info" style="margin-left:95px;">
|
||||
<em class="info" style="margin-left:95px;padding-left: 5px;">
|
||||
<%= l(:text_command) %>
|
||||
</em>
|
||||
<% end %>
|
||||
|
@ -127,19 +127,19 @@
|
|||
<%= l(:label_new_course_description) %>
|
||||
</label>
|
||||
<span class="jstEditor">
|
||||
<textarea id="course_description" class="wiki-edit" style="font-size:small;width:490px;margin-left:10px;" rows="8" name="course[description]" cols="40">
|
||||
<textarea id="course_description" class="wiki-edit" style="font-size:small; width:490px; margin-left:10px;" rows="8" name="course[description]" cols="40">
|
||||
<%= @course.description %>
|
||||
</textarea>
|
||||
</span>
|
||||
</p>
|
||||
<p style="margin-left:-10px;">
|
||||
<em style="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<em style="color: #888888; display: block; font-size: 90%; font-style: normal;">
|
||||
<%= f.check_box :is_public, :style => "margin-left:10px;" %>
|
||||
<%= l(:label_course_public_info) %>
|
||||
</em>
|
||||
</p>
|
||||
<p style="margin-left:-10px;">
|
||||
<em style="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<em style="color: #888888; display: block; font-size: 90%; font-style: normal;">
|
||||
<%= f.check_box :open_student, :style => "margin-left:10px;" %>
|
||||
<%= l(:label_course_open_student_info) %>
|
||||
</em>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<script type="text/javascript">
|
||||
function check_groupname() {
|
||||
var $group_name = $('#group_name');
|
||||
|
||||
|
||||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: document.getElementById('group_name').value },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert(data.message);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
var $group_name = $('#group_name')
|
||||
$group_name.blur(function (event) {
|
||||
if ($(this).is('#group_name')) {
|
||||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: this.value },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert('<%= l(:label_groupname_repeat) %>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type=" text/javascript" charset="utf-8">
|
||||
function validate_groupname(value1) {
|
||||
|
@ -48,9 +48,9 @@
|
|||
|
||||
}
|
||||
function validate_add_group() {
|
||||
|
||||
check_groupname();
|
||||
|
||||
value1 = document.getElementById('group_name').value;
|
||||
validate_groupname(value1);
|
||||
validate_groupname_null(value1);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<%= labelled_form_for @course do |f| %>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<span style="padding-left: 60px;margin-left: 36px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
<!-- <%#= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<td class="location-list">
|
||||
<strong><%= l(:label_user_location) %> :</strong>
|
||||
</td>
|
||||
<td rowspan="2" valign="bottom">
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current.user_extensions.identity == 0 %>
|
||||
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_course, nil, :global => true) %></td>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<button name="button" class="f_l ml10" onclick="_file.click()" onmouseover="this.focus()" type="button" style="width:80px; height:26px;">上传文件</button>
|
||||
<button name="button" class="f_l ml10" onclick="_file.click()" onmouseover="this.focus()" type="button" style="width:20%; height:26%;"><%= l(:label_browse)%></button>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<div id="popbox_upload" style="margin-top: -30px;margin-left: -20px;margin-right: -10px;">
|
||||
<div class="upload_con">
|
||||
<h2>上传资源</h2>
|
||||
<h2><%= l(:label_upload_files)%></h2>
|
||||
<div class="upload_box">
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<div id="network_issue" style="color: red; display: none;">上传出现错误,请您检查您的网络环境,并刷新页面重新上传。</div>
|
||||
<div id="network_issue" style="color: red; display: none;"><%= l(:label_file_upload_error_messages)%></div>
|
||||
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %>
|
||||
<label style="margin-top:3px;">文件浏览:</label>
|
||||
<label style="margin-top:3px;"><%= l(:label_file_upload)%></label>
|
||||
<%= render :partial => 'attachement_list',:locals => {:course => course} %>
|
||||
<div class="cl"></div>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="upload_btn" onclick="submit_resource();">确 认</a>
|
||||
<a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();">取 消</a>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="upload_btn" onclick="submit_resource();"><%= l(:label_confirmation)%></a>
|
||||
<a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();"><%= l(:button_cancel)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -78,12 +78,9 @@
|
|||
</span>
|
||||
作品描述 :
|
||||
</label>
|
||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
|
||||
<br />
|
||||
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
|
||||
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
|
||||
</p>
|
||||
<br/> <span id="homework_attach_description_span" style="padding-left: 100px;"></span>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
<label style="float: left;">
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#@nav_dispaly_user_label = 1
|
||||
end
|
||||
%>
|
||||
<%= render :partial => "layouts/base_feedback" %>
|
||||
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
|
||||
<div class="welcome_logo">
|
||||
<%=link_to image_tag("/images/logo.png",weight:"36px", height: "36px")%>
|
||||
|
|
|
@ -41,14 +41,11 @@
|
|||
</td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="project-search">
|
||||
<%= form_tag({:controller => 'bids', :action => 'contest'}, :id => "contest_search_form",:method => :get) do %>
|
||||
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%= hidden_field_tag 'reward_type', @bid.reward_type %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<a href="#" onclick="$('#contest_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
@nav_dispaly_forum_label = 1
|
||||
@nav_dispaly_course_label = nil
|
||||
@nav_dispaly_store_all_label = 1 %>
|
||||
<% teacher_num = teacherCount(@course) %>
|
||||
<% student_num = studentCount(@course) %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -26,6 +24,7 @@
|
|||
</head>
|
||||
<!--add by huang-->
|
||||
<body class="<%= h body_css_classes %>">
|
||||
<%= render :partial => 'courses/course_ad' %>
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
|
@ -47,13 +46,9 @@
|
|||
</td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
|
||||
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %>
|
||||
<a href="#" onclick="$('#course_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %>
|
||||
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -125,19 +120,19 @@
|
|||
<td class="font_index">
|
||||
<!-- 1 教师; 2 学生;0 全部-->
|
||||
<% if User.current.member_of_course?(@course) %>
|
||||
<%= link_to "#{teacher_num}", course_member_path(@course, :role => 1), :course => '1' %>
|
||||
<%= link_to "#{teacherCount(@course)}", course_member_path(@course, :role => 1), :course => '1' %>
|
||||
<% else %>
|
||||
<span>
|
||||
<%= teacher_num %>
|
||||
<%= teacherCount(@course)%>
|
||||
</span>
|
||||
<% end%>
|
||||
</td>
|
||||
<td class="font_index">
|
||||
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) %>
|
||||
<%= link_to "#{student_num}", course_member_path(@course, :role => 2), :course => '1' %>
|
||||
<%= link_to "#{studentCount(@course)}", course_member_path(@course, :role => 2), :course => '1' %>
|
||||
<% else %>
|
||||
<span>
|
||||
<%= student_num %>
|
||||
<%= studentCount(@course)%>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
|
@ -146,10 +141,10 @@
|
|||
</td>
|
||||
<tr class="font_aram">
|
||||
<td align="center" width="80px" id="teacherCount">
|
||||
<%= l(:label_x_base_courses_teacher, :count => teacher_num) %>
|
||||
<%= l(:label_x_base_courses_teacher, :count => teacherCount(@course)) %>
|
||||
</td>
|
||||
<td align="center" width="80px" id="studentCount">
|
||||
<%= l(:label_x_base_courses_student, :count => student_num) %>
|
||||
<%= l(:label_x_base_courses_student, :count => studentCount(@course)) %>
|
||||
</td>
|
||||
<td align="center" width="80px">
|
||||
<%= l(:label_x_course_data, :count => files_count) %>
|
||||
|
|
|
@ -61,14 +61,14 @@
|
|||
if(regexName1()){$("#contst_search_form").submit();}
|
||||
}
|
||||
</script>
|
||||
<div class="project-search" style="float: left; margin: 0px">
|
||||
<div class="project-search" style="width: 100%">
|
||||
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px", :style=>"float:left" %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="/*padding-top: 7px !important;*/ height:50%;">
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
<span id="contest_name_span_head"></span>
|
||||
<% end %>
|
||||
|
@ -78,8 +78,8 @@
|
|||
<tr>
|
||||
<td>
|
||||
<%=link_to l(:field_homepage), home_path %> >
|
||||
<a href="http://<%= Setting.host_contest %>" class="link_other_item">
|
||||
<%=l(:label_contests_management_platform)%>
|
||||
<a>
|
||||
<%= l(:label_contest_innovate) %>
|
||||
</a> >
|
||||
<span title="<%= @contest.name%>">
|
||||
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), contest_contestnotifications_path(@contest) %>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td class="info_font" title="<%= @contest.name%>">
|
||||
<%= link_to @contest.name, show_contest_contest_path(@contest) %>
|
||||
<%= link_to @contest.name, contest_contestnotifications_path(@contest) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% if User.current.login? %>
|
||||
|
|
|
@ -64,10 +64,10 @@
|
|||
}
|
||||
</script>
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
|
||||
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" >
|
||||
<%= l(:label_search)%>
|
||||
</a>
|
||||
<br />
|
||||
|
@ -133,7 +133,7 @@
|
|||
<%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %>
|
||||
</td>
|
||||
<td class="font_index">
|
||||
<%=link_to "#{@project.issues.count}", project_issues_path(@project) %>
|
||||
<%=link_to "#{@project.issues.where('status_id in (1,2,4,6)').count}", project_issues_path(@project) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="font_aram">
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
<td align="right">
|
||||
<%#= submit_tag l(:button_submit), :name => nil ,
|
||||
:class => "bid_btn" %>
|
||||
<a href="#" onclick='$("#my_brief_introduction").parent().submit();' class="ButtonColor m3p10" style="padding: 5px 10px;" >
|
||||
<a href="#" onclick='$("#my_brief_introduction").parent().submit();' class="ButtonColor m3p10" >
|
||||
<%= l(:label_submit)%>
|
||||
</a>
|
||||
</td>
|
||||
|
@ -221,16 +221,16 @@
|
|||
<div class="inf_user_context">
|
||||
<table style="font-family:'微软雅黑'" width="240">
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_user_joinin) %>:</span>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:label_user_joinin) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= format_time(@user.created_on) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_user_login) %>:</span>
|
||||
<td style="padding-left: 5px">
|
||||
<%= l(:label_user_login) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
||||
<%= format_time(@user.last_login_on) %>
|
||||
|
@ -239,8 +239,8 @@
|
|||
<% unless @user.user_extensions.nil? %>
|
||||
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"><%= l(:field_occupation) %>:</span>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:field_occupation) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<% unless @user.user_extensions.school.nil? %>
|
||||
|
@ -250,8 +250,8 @@
|
|||
</tr>
|
||||
<% elsif @user.user_extensions.identity == 3 %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:field_occupation) %>:</span>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:field_occupation) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.occupation %>
|
||||
|
@ -259,8 +259,8 @@
|
|||
</tr>
|
||||
<% elsif @user.user_extensions.identity == 2 %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_company_name) %>:</span>
|
||||
<td style="padding-left: 18px" width="70px">
|
||||
<%= l(:label_company_name) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.firstname %>
|
||||
|
@ -268,8 +268,8 @@
|
|||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px">
|
||||
<span style="float: right"> <%= l(:label_location) %>:</span>
|
||||
<td style="padding-left: 31px" width="76px">
|
||||
<%= l(:label_location) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.location %>
|
||||
|
@ -278,8 +278,8 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<td style=" float: right" width="70px" >
|
||||
<span style="float: right"> <%= l(:label_technical_title) %>:</span>
|
||||
<td style="padding-left: 31px" width="76px" >
|
||||
<%= l(:label_technical_title) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<span id = "td_tech_title"></span>
|
||||
|
@ -289,8 +289,8 @@
|
|||
<% if @user.user_extensions.identity == 1 %>
|
||||
<% if(is_watching?(@user) ) %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px" >
|
||||
<span style="float: right"> <%= l(:label_bidding_user_studentcode)%>:</span>
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<%= l(:label_bidding_user_studentcode)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.student_id %>
|
||||
|
@ -298,7 +298,7 @@
|
|||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px" >
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<%= l(:label_identity)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
|
@ -309,7 +309,7 @@
|
|||
<% end %>
|
||||
<% elsif @user.user_extensions.identity == 3 %>
|
||||
<tr>
|
||||
<td style=" float: right" width="70px" >
|
||||
<td style="padding-left: 31px" width="70px" >
|
||||
<%= l(:label_identity)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_user_label = 1
|
||||
@nav_dispaly_store_all_label = 1
|
||||
%>
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
@nav_dispaly_main_contest_label = 1 %>
|
||||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= current_language %>">
|
||||
|
@ -45,6 +45,6 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
<!--<#%= call_hook :view_layouts_base_body_bottom %>-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2" valign="bottom">
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current.user_extensions.identity == 0 %>
|
||||
<%= link_to(l(:label_course_new), {:controller => 'projects', :action => 'new', :course => 1, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %></td>
|
||||
|
@ -35,7 +35,7 @@
|
|||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td>
|
||||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2" valign="bottom">
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
|
||||
<% end %>
|
||||
|
|
|
@ -77,10 +77,10 @@
|
|||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<!--<%#= f.submit l(:button_project_tags_add),:class => "ButtonColor m3p10" %>-->
|
||||
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" style="padding: 3px 6px">
|
||||
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" >
|
||||
<%= l(:button_project_tags_add)%>
|
||||
</a>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10' ,:style=>"padding:3px 6px"%>
|
||||
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10'%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
<div class="linkother" style="margin-left: 30%; float: left">
|
||||
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
|
||||
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
|
||||
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
|
||||
<div class="clearfix"></div>
|
||||
<div class="linkother">
|
||||
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
|
||||
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
|
||||
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
|
||||
</div>
|
|
@ -1,58 +1,58 @@
|
|||
<%
|
||||
select_option = []
|
||||
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << ['用户', 'users']
|
||||
#select_option << ['教师', 'users_teacher'],
|
||||
#select_option << ['学生', 'users_student']
|
||||
%>
|
||||
<style type="text/css">
|
||||
form #q, form #search_type{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
height: 33px;
|
||||
}
|
||||
form #q{
|
||||
font-size: 13px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-right: none;
|
||||
|
||||
}
|
||||
form #search_type{
|
||||
font-size: 13px;
|
||||
color: #363739;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-left: 1px outset #83A9A9;
|
||||
margin-left: -4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 0.01px;
|
||||
text-overflow: '';
|
||||
}
|
||||
.search_widget{
|
||||
display:inline-block;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.search_widget:hover{
|
||||
box-shadow: 0px 0px 3px #56B4EF;
|
||||
}
|
||||
<%#完了把上面东西放到 .css 里%>
|
||||
</style>
|
||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<div class="project-search" style="float: right">
|
||||
<div class='search_widget'>
|
||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27, %>
|
||||
<%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil, :style => "float:right" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%
|
||||
select_option = []
|
||||
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
|
||||
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
|
||||
select_option << ['用户', 'users']
|
||||
#select_option << ['教师', 'users_teacher'],
|
||||
#select_option << ['学生', 'users_student']
|
||||
%>
|
||||
<style type="text/css">
|
||||
form #q, form #search_type{
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
height: 33px;
|
||||
}
|
||||
form #q{
|
||||
font-size: 13px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-right: none;
|
||||
|
||||
}
|
||||
form #search_type{
|
||||
font-size: 13px;
|
||||
color: #363739;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-left: 1px outset #83A9A9;
|
||||
margin-left: -4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 0.01px;
|
||||
text-overflow: '';
|
||||
}
|
||||
.search_widget{
|
||||
display:inline-block;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.search_widget:hover{
|
||||
box-shadow: 0px 0px 3px #56B4EF;
|
||||
}
|
||||
<%#完了把上面东西放到 .css 里%>
|
||||
</style>
|
||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<div class="project-search" style="float: right">
|
||||
<div class='search_widget'>
|
||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
|
||||
<%= select_tag(:search_type, options_for_select(select_option) ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -29,7 +29,7 @@ form #search_type{
|
|||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-left: 1px outset #83A9A9;
|
||||
margin-left: 0px;
|
||||
margin-left: -4px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 0.01px;
|
||||
|
@ -45,7 +45,7 @@ form #search_by
|
|||
border-bottom-left-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
border-left: 1px outset #83A9A9;
|
||||
margin-left: 0px;
|
||||
margin-left: -6px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 0.01px;
|
||||
|
@ -87,14 +87,13 @@ form #search_by
|
|||
</script>
|
||||
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
|
||||
<div class="project-search" style="float: right">
|
||||
<div class='search_widget' >
|
||||
|
||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字' %>
|
||||
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
|
||||
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
|
||||
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
|
||||
<div class='search_widget'>
|
||||
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
|
||||
<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">
|
||||
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();" ) %>
|
||||
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();" ) %>
|
||||
</div>
|
||||
<%#= hidden_field_tag 'project_type', project_type %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -119,7 +119,6 @@
|
|||
}
|
||||
})();
|
||||
</script>
|
||||
<div>
|
||||
<div class='top_bar'>
|
||||
<%#= render partial: 'wei_xin' %>
|
||||
<div class="main-content-bar" id="main-content-bar">
|
||||
|
@ -325,7 +324,6 @@
|
|||
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<%= render partial: 'link_to_another' %>
|
||||
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% @projects.map do |project| %>
|
||||
<li style="overflow:hidden;word-break:break-all;height:100%;word-wrap: break-word;" class='<%= cycle("odd", "even") %>'>
|
||||
<li style="overflow:auto;word-break:break-all;height:100%;word-wrap: break-word;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue