This commit is contained in:
lizanle 2015-01-27 14:32:54 +08:00
commit fd42af1ac4
69 changed files with 1057 additions and 576 deletions

View File

@ -209,16 +209,16 @@ java.lang.UnsupportedOperationException: Not supported yet.
at com.aptana.index.core.IndexRequestJob.indexFileStores(IndexRequestJob.java:205)
at com.aptana.index.core.IndexContainerJob.run(IndexContainerJob.java:114)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SESSION 2015-01-05 10:21:34.093 -----------------------------------------------
!SESSION 2015-01-17 11:30:30.655 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435
!ENTRY org.eclipse.core.resources 4 567 2015-01-17 11:30:37.624
!MESSAGE Workspace restored, but some problems occurred.
!SUBENTRY 1 org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435
!SUBENTRY 1 org.eclipse.core.resources 4 567 2015-01-17 11:30:37.624
!MESSAGE Could not read metadata for 'demo'.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: The project description file (.project) for 'demo' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
@ -261,59 +261,8 @@ org.eclipse.core.internal.resources.ResourceException: The project description f
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
!SUBENTRY 2 org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435
!SUBENTRY 2 org.eclipse.core.resources 4 567 2015-01-17 11:30:37.626
!MESSAGE The project description file (.project) for 'demo' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
!ENTRY com.aptana.terminal 1 0 2015-01-05 10:22:03.546
!MESSAGE Starting terminal process failed.
!STACK 1
org.eclipse.core.runtime.CoreException: Shell executable could not be found.
at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113)
at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40)
at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38)
at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220)
at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208)
at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102)
!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:22:03.546
!MESSAGE Shell executable could not be found.
!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:30.988
!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.tm.internal.terminal.emulator.VT100TerminalControl$1
!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:30.989
!ENTRY org.eclipse.core.jobs 2 2 2015-01-17 11:33:58.913
!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: com.aptana.usage.internal.DefaultAnalyticsEventHandler$1
!SESSION 2015-01-05 10:27:31.720 -----------------------------------------------
eclipse.buildId=3.4.2.201308081805
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY com.aptana.terminal 1 0 2015-01-05 10:27:34.915
!MESSAGE Starting terminal process failed.
!STACK 1
org.eclipse.core.runtime.CoreException: Shell executable could not be found.
at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113)
at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40)
at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38)
at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220)
at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208)
at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102)
!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:27:34.915
!MESSAGE Shell executable could not be found.
!ENTRY com.aptana.terminal 1 0 2015-01-05 10:27:37.984
!MESSAGE Starting terminal process failed.
!STACK 1
org.eclipse.core.runtime.CoreException: Shell executable could not be found.
at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113)
at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40)
at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38)
at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220)
at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208)
at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102)
!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:27:37.984
!MESSAGE Shell executable could not be found.
!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:55.438
!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.tm.internal.terminal.emulator.VT100TerminalControl$1

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<connections/>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<connection>
<connection>
<name>Default</name>
<source>file:/C:/Users/Administrator</source>
</connection>
</connection>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sites/>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<servers>
<server host="0.0.0.0" port="3000" project="E:/code/demo" type="org.radrails.rails.railsServer">
<name>demo</name>
</server>
</servers>

View File

@ -1,2 +1,2 @@
activeProject=demo
activeProject=trustie
eclipse.preferences.version=1

View File

@ -1,7 +1,7 @@
ACTIVE_HYPERLINK_COLOR=84,143,160
ACTIVE_THEME=Aptana Studio
HYPERLINK_COLOR=84,143,160
THEME_CHANGED=1420424854199
THEME_CHANGED=1421465443240
eclipse.preferences.version=1
hyperlinkColor=84,143,160
hyperlinkColor.SystemDefault=false

View File

@ -2,6 +2,6 @@ PROBLEMS_FILTERS_MIGRATE=true
SHOW_COOLBAR=true
SHOW_PERSPECTIVEBAR=true
eclipse.preferences.version=1
platformState=1420424495377
platformState=1420528131671
quickStart=false
tipsAndTricks=true

View File

@ -3,7 +3,7 @@
<booleanAttribute key="advancedRunEnabled" value="false"/>
<booleanAttribute key="appendProjectName" value="true"/>
<stringAttribute key="browserCmdLine" value=""/>
<stringAttribute key="browserExecutable" value=""/>
<stringAttribute key="browserExecutable" value="C:\Program Files (x86)\Mozilla Firefox\firefox.exe"/>
<stringAttribute key="browserNature" value="Firefox"/>
<stringAttribute key="externalBaseUrl" value=""/>
<stringAttribute key="httpGetData" value=""/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<workbench progressCount="23" version="2.0">
<workbench progressCount="26" version="2.0">
<workbenchAdvisor/>
<window height="940" maximized="true" width="1200" x="13" y="31">
<fastViewData fastViewLocation="1024"/>
@ -37,7 +37,7 @@
<view id="com.aptana.terminal.views.terminal:demo" partName="demo">
<viewState>
<title>demo</title>
<workingDirectory>C:\Users\Administrator</workingDirectory>
<workingDirectory>C:\Users\zh</workingDirectory>
</viewState>
</view>
<view id="com.aptana.snippets.ui.views.SnippetsView" partName="Snippets">
@ -46,7 +46,7 @@
<view id="com.aptana.terminal.views.terminal" partName="Terminal">
<viewState>
<title>Terminal</title>
<workingDirectory>C:\Users\Administrator</workingDirectory>
<workingDirectory>C:\Users\nudt</workingDirectory>
</viewState>
</view>
<view id="com.aptana.samples.ui.SamplesView" partName="Samples">
@ -66,13 +66,19 @@
<viewState/>
</view>
<view id="com.aptana.explorer.view" partName="App Explorer">
<viewState CommonNavigator.LINKING_ENABLED="0" GitChangedFilesFilterEnabled="" activeProject="demo"/>
<viewState CommonNavigator.LINKING_ENABLED="0" GitChangedFilesFilterEnabled="" activeProject="trustie">
<project name="trustie">
<selection>
<element path="/trustie"/>
</selection>
</project>
</viewState>
</view>
<view id="org.eclipse.ui.views.ContentOutline" partName="Outline">
<viewState/>
</view>
</views>
<perspectives activePart="org.eclipse.ui.console.ConsoleView" activePerspective="com.aptana.ui.WebPerspective">
<perspectives activePart="org.eclipse.ui.navigator.ProjectExplorer" activePerspective="com.aptana.ui.WebPerspective">
<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
<descriptor class="com.aptana.ui.internal.WebPerspectiveFactory" id="com.aptana.ui.WebPerspective" label="Web"/>
<alwaysOnActionSet id="com.aptana.browser.actionSet"/>
@ -118,14 +124,19 @@
<view id="com.aptana.terminal.views.terminal"/>
<view id="org.eclipse.ui.views.ProblemView"/>
<view id="com.aptana.terminal.views.terminal:demo"/>
<view id="org.eclipse.ui.views.ContentOutline"/>
<view id="com.aptana.samples.ui.SamplesView"/>
<view id="com.aptana.snippets.ui.views.SnippetsView"/>
<fastViewBars/>
<fastViewBars>
<fastViewBar fastViewLocation="16384" id="org.eclipse.ui.internal.ViewStack@d90254" orientation="256" selectedTabId="com.aptana.snippets.ui.views.SnippetsView" style="0">
<fastViews>
<view id="org.eclipse.ui.views.ContentOutline" ratio="0.3"/>
<view id="com.aptana.samples.ui.SamplesView" ratio="0.3"/>
<view id="com.aptana.snippets.ui.views.SnippetsView" ratio="0.3"/>
</fastViews>
</fastViewBar>
</fastViewBars>
<layout>
<mainWindow>
<info folder="true" part="left">
<folder activePageID="com.aptana.explorer.view" appearance="2" expanded="2">
<folder activePageID="org.eclipse.ui.navigator.ProjectExplorer" appearance="2" expanded="2">
<page content="com.aptana.explorer.view" label="App Explorer"/>
<page content="org.eclipse.ui.navigator.ProjectExplorer" label="Project Explorer"/>
<page content="com.aptana.ui.io.remoteview" label="LabelNotFound"/>
@ -144,7 +155,7 @@
</info>
<info part="org.eclipse.ui.editorss" ratio="0.19931857" ratioLeft="234" ratioRight="940" relationship="2" relative="left"/>
<info folder="true" part="terminalArea" ratio="0.75" ratioLeft="627" ratioRight="209" relationship="4" relative="org.eclipse.ui.editorss">
<folder activePageID="org.eclipse.ui.console.ConsoleView" appearance="2" expanded="2">
<folder activePageID="com.aptana.terminal.views.terminal:demo" appearance="2" expanded="2">
<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>
<page content="com.aptana.terminal.views.terminal" label="Terminal"/>
<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
@ -160,15 +171,11 @@
</folder>
</info>
<info folder="true" part="org.eclipse.ui.internal.ViewStack@d90254" ratio="0.75" ratioLeft="627" ratioRight="209" relationship="4" relative="left">
<folder activePageID="org.eclipse.ui.views.ContentOutline" appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ContentOutline" label="Outline"/>
<page content="com.aptana.samples.ui.SamplesView" label="Samples"/>
<page content="com.aptana.snippets.ui.views.SnippetsView" label="Snippets"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
<part id="1"/>
<part id="2"/>
</presentation>
<folder appearance="2" expanded="0">
<page content="org.eclipse.ui.views.ContentOutline" label="LabelNotFound"/>
<page content="com.aptana.samples.ui.SamplesView" label="LabelNotFound"/>
<page content="com.aptana.snippets.ui.views.SnippetsView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
</folder>
</info>
</mainWindow>
@ -182,6 +189,9 @@
<workbenchWindowAdvisor/>
<actionBarAdvisor/>
<trimLayout>
<trimArea IMemento.internal.id="16384">
<trimItem IMemento.internal.id="org.eclipse.ui.internal.ViewStack@d90254"/>
</trimArea>
<trimArea IMemento.internal.id="128">
<trimItem IMemento.internal.id="org.eclipse.ui.internal.WorkbenchWindow.topBar"/>
</trimArea>

View File

@ -3,7 +3,26 @@ class AppliedProjectController < ApplicationController
#申请加入项目
def applied_join_project
@user_id = params[:user_id]
@project = Project.find(params[:project_id])
@project = Project.find_by_id(params[:project_id])
if params[:project_join]
if @project
@applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
if @applieds.count == 0
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
Mailer.applied_project(appliedproject).deliver
@status = 2
else
@status = 1
end
else
@status = 0
end
respond_to do |format|
format.js
end
return
end
@applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
if @applieds.count == 0
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])

View File

@ -1,8 +1,8 @@
class PollController < ApplicationController
before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result]
before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll]
before_filter :find_container, :only => [:new,:create, :index]
before_filter :is_member_of_course, :only => [:index,:show,:poll_result]
before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll]
before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll]
include PollHelper
def index
if @course
@ -47,6 +47,7 @@ class PollController < ApplicationController
:user_id => User.current.id,
:published_at => Time.now,
:closed_at => Time.now,
:show_result => 1,
:polls_description => ""
}
@poll = Poll.create option
@ -69,8 +70,8 @@ class PollController < ApplicationController
end
def update
@poll.polls_name = params[:polls_name].empty? ? l(:label_poll_title) : params[:polls_name]
@poll.polls_description = params[:polls_description].empty? ? l(:label_poll_description) : params[:polls_description]
@poll.polls_name = params[:polls_name]
@poll.polls_description = params[:polls_description]
if @poll.save
respond_to do |format|
format.js
@ -338,6 +339,17 @@ class PollController < ApplicationController
end
end
#关闭问卷
def close_poll
@poll.polls_status = 3
@poll.closed_at = Time.now
if @poll.save
respond_to do |format|
format.js
end
end
end
private
def find_poll_and_course
@poll = Poll.find params[:id]

View File

@ -494,7 +494,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, user_path( principal.id)}</label>\n"
end
s.html_safe
end

View File

@ -64,13 +64,13 @@ module PollHelper
def options_show pq
case pq
when 1
"单选题"
l(:label_MC)
when 2
"多选题"
l(:label_MCQ)
when 3
"单行主观题"
l(:label_single)
else
"多行主观题"
l(:label_mulit)
end
end

View File

@ -36,7 +36,7 @@ class Mailer < ActionMailer::Base
@author = forum.creator
recipients = forum.creator.mail
# cc = wiki_content.page.wiki.watcher_recipients - recipients
@issue_author_url = url_for(user_activities_url(@author))
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id)
mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]"
@ -47,6 +47,8 @@ class Mailer < ActionMailer::Base
redmine_headers 'Memo' => memo.id
@forum = memo.forum
@author = memo.author
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
@issue_author_url = url_for(user_activities_url(@author))
recipients ||= []
mems = memo.self_and_siblings
mems.each do |mem|
@ -69,7 +71,7 @@ class Mailer < ActionMailer::Base
@mail = journals_for_message.at_user if journals_for_message.at_user
@message = journals_for_message.notes
@title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}"
@issue_author_url = url_for(user_activities_url(@user))
@url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型
when :Bid
course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
@ -289,6 +291,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Project' => document.project.identifier
@author = User.current
@document = document
@issue_author_url = url_for(user_activities_url(@author))
@document_url = url_for(:controller => 'documents', :action => 'show', :id => document)
mail :to => document.recipients,
:subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
@ -304,6 +307,7 @@ class Mailer < ActionMailer::Base
added_to = ''
added_to_url = ''
@author = attachments.first.author
@issue_author_url = url_for(user_activities_url(@author))
case container.class.name
when 'Project'
added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container)
@ -356,6 +360,7 @@ class Mailer < ActionMailer::Base
if news.project
redmine_headers 'Project' => news.project.identifier
@author = news.author
@issue_author_url = url_for(user_activities_url(@author))
message_id news
@news = news
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
@ -364,6 +369,7 @@ class Mailer < ActionMailer::Base
elsif news.course
redmine_headers 'Course' => news.course.id
@author = news.author
@issue_author_url = url_for(user_activities_url(@author))
message_id news
@news = news
recipients = news.course.notified_users.select { |user| user.allowed_to?(:view_files, news.course) }.collect { |u| u.mail }
@ -383,6 +389,7 @@ class Mailer < ActionMailer::Base
if news.project
redmine_headers 'Project' => news.project.identifier
@author = comment.author
@issue_author_url = url_for(user_activities_url(@author))
message_id comment
@news = news
@comment = comment
@ -393,6 +400,7 @@ class Mailer < ActionMailer::Base
elsif news.course
redmine_headers 'Course' => news.course.id
@author = comment.author
@issue_author_url = url_for(user_activities_url(@author))
message_id comment
@news = news
@comment = comment
@ -414,6 +422,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Project' => message.project.identifier,
'Topic-Id' => (message.parent_id || message.id)
@author = message.author
@issue_author_url = url_for(user_activities_url(@author))
message_id message
references message.parent unless message.parent.nil?
recipients = message.recipients
@ -427,6 +436,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Course' => message.course.id,
'Topic-Id' => (message.parent_id || message.id)
@author = message.author
@issue_author_url = url_for(user_activities_url(@author))
message_id message
references message.parent unless message.parent.nil?
recipients = message.course.notified_users.select { |user| user.allowed_to?(:view_files, message.course) }.collect { |u| u.mail }

View File

@ -0,0 +1,9 @@
<% if @status == 0%>
alert("您申请的项目不存在");
<% elsif @status == 1%>
alert("请勿重复申请加入该项目");
<% elsif @status == 2%>
alert("申请成功");
<%else%>
alert("申请失败");
<%end%>

View File

@ -29,7 +29,7 @@
<%= l(:label_tags_course_name) %>
<span class="required">*&nbsp;&nbsp;</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"> *&nbsp;&nbsp;</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>&nbsp;
@ -118,7 +118,7 @@
</label>
<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 %>

View File

@ -5,9 +5,9 @@
<% if display #如果课程已结束%>
<% linkPath = course_endTime_timeout?(course) ? restartcourse_course_path(course) : finishcourse_course_path(course, format: :js) %>
<% desc = course_endTime_timeout?(course) ? '重启' : '关闭' %>
<% desc = course_endTime_timeout?(course) ? l(:label_course_reload) : l(:label_course_closed) %>
<%= link_to "#{desc}", linkPath, :remote => true, :method => :post, :id => id, :confirm => ("确定要#{desc}课程?") %>
<%= link_to "#{desc}", linkPath, :remote => true, :method => :post, :id => id, :confirm => l(:label_course_closed_tips, :desc => desc) %>
<% else %>
<!-- 关闭课程block -->
<% end %>

View File

@ -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' %> -->

View File

@ -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',

View File

@ -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();">确&nbsp;&nbsp;认</a>
<a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();">取&nbsp;&nbsp;消</a>
<a id="submit_resource" href="javascript:void(0);" class="upload_btn" onclick="submit_resource();"><%= l(:button_confirm)%></a>
<a href="javascript:void(0);" class="upload_btn upload_btn_grey" onclick="closeModal();"><%= l(:button_cancel)%></a>
<% end %>
</div>

View File

@ -135,7 +135,6 @@ function f_submit()
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>意见反馈</title>
</head>

View File

@ -305,7 +305,7 @@
.polls_btn a{font-size:14px; color:#444444;font-weight:bold;}
.polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;}
.polls_btn a{ float:left;}
.polls_n{float: left;background: #ff5d31;color: #fff;width: 12px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; }
.polls_n{float: left;background: #ff5d31;color: #fff;width: 32px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; }
.polls_n p{ margin-top:-4px;}
.cl{ clear:both; overflow:hidden; }
</style>
@ -313,7 +313,7 @@
<!--<a href="#">问卷调查<span >12</span></a>-->
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
<div class="polls_n">
<p>N</p>
<p>NEW</p>
</div>
<div class="cl"></div>
</div>

View File

@ -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? %>

View File

@ -132,8 +132,9 @@
<td class="font_index">
<%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %>
</td>
<!-- 项目sidebar栏显示问题数目为项目总问题数排除已关闭和已解决的项目问题数即排除3已解决5已关闭的 项目问题数 !-->
<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">

View File

@ -44,9 +44,7 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
<p><%= l(:mail_issue_greetings)%></p>
</div><!--mail_head end-->
<%= yield %>
<hr />
<span class="footer" style="margin:0; padding:0;"><%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %></span><!--mail_foot end-->
</div>
</div>
</div>
</body>
</html>

View File

@ -1,26 +1,29 @@
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;"><%= link_to(h("#{@issue.project.name}"), @project_url, :style=>'color:#1b55a7; font-weight:bold;') %></span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span><span style="float: left; width: 526px"><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span><span style="float: left; width: 526px"><%= issue.project.name %><b>|&nbsp;</b><%= l(:mail_issue_from_project)%></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<li style="list-style-type:none; margin:0; padding:0;float: left; "><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span><span style="float: left; width: 526px"><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;float: left; "><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span><span style="float: left; width: 526px"><%= issue.project.name %><b>|&nbsp;</b><%= l(:mail_issue_from_project)%></span></li>
<li style="list-style-type:none; margin:0; padding:0; float: left; "><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<% if @journal.nil? %>
<%= issue.description %>
<%= issue.description=='' ? l(:label_none) : issue.description %>
<% else %>
<%= @journal.notes %>
<%= @journal.notes=='' ? l(:label_none) : @journal.notes %>
<% end%>
</span>
</li>
<li style="list-style-type:none; margin:0; padding:0;">
<% unless @issue.attachments.nil? %>
<span style="float: left"> <strong><%= l(:mail_issue_attachments)%></strong></span>
<li style="list-style-type:none; margin:0; padding:0;float: left; ">
<span style="float: left"> <strong><%= l(:mail_issue_attachments)%></strong></span>
<% if @issue.attachments.count == 0 %>
<%= l(:label_none)%>
<% else %>
<span style="float: left; width: 526px; margin:0; padding:0;">
<% @issue.attachments.each do |attach| %>
<p style="float: left; width: 526px; margin:0; padding:0;"><%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false, :style=>'color:#1b55a7; font-weight:bold;')%></p>

View File

@ -1,4 +1,29 @@
<h1><%= link_to(h(@forum.name), @forum_url) %></h1>
<em><%=h @forum.creator.name %></em>
<%= @forum.description.html_safe %>
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@forum.creator.login}(#{@forum.creator.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:label_forum_new)%>
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @forum.description.html_safe %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @forum_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,4 +1,32 @@
<h1><%= link_to(h(@memo.subject), @memo_url) %></h1>
<em><%=h @memo.author.name %></em>
<%= @memo.content.html_safe %>
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@memo.subject), @memo_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @memo.content.html_safe %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @memo_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,10 +1,6 @@
<div>
<%= l(:text_issue_updated, :id => "##{@issue.project_index}", :author => h(@journal.user)) %>
</div>
<div class="cl" style="margin-top: 15px; clear:both; overflow:hidden;"></div>
<hr/>
<%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
<div class="mail_foot"><%= link_to( l(:mail_issue_footer), @user_url, :style=>'font-size:12px; font-weight:normal; color:#1b55a7;') %> </div>

View File

@ -1,5 +1,25 @@
<em>尊敬的用户,<%= @user %>给你留言了:</em>
<div><%= @message %></div>
<p>点击链接查看最新回复<%= link_to(@url, @url) %>
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></p>
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span>给你留言了
</p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @message %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,7 +1,8 @@
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= h @message.author %>(<%= @message.author.show_name %>)
<%= link_to(h("#{@message.author.login}(#{@message.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<% if @message.project %>
@ -29,7 +30,7 @@
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(h(:mail_issue_reply), @message_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
<%= link_to(l(:mail_issue_reply), @message_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,4 +1,41 @@
<h1><%= link_to(h(@news.title), @news_url) %></h1>
<em><%=h @news.author.name %></em>
<%= textilizable(@news, :description, :only_path => false) %>
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<% if @news.project %>
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% elsif @news.course %>
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% end %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<% if @news.project %>
<span style="float: left; width: 526px"><%=h @news.project.name %></span>
<% elsif @news.course %>
<span style="float: left; width: 526px"><%=h @news.course.name %></span>
<% end %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @news.description %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @news_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,5 +1,40 @@
<h1><%= link_to(h(@news.title), @news_url) %></h1>
<p><%= l(:text_user_wrote, :value => h(@comment.author)) %></p>
<p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@comment.author.login}(#{@comment.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<% if @news.project %>
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% elsif @news.course %>
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% end %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<% if @news.project %>
<span style="float: left; width: 526px"><%=h @news.project.name %></span>
<% elsif @news.course %>
<span style="float: left; width: 526px"><%=h @news.course.name %></span>
<% end %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @comment.comments %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @news_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>
<%= textilizable @comment, :comments, :only_path => false %>

View File

@ -1,5 +1,6 @@
<!-- <h1>New memo</h1> -->
<% @replying = !@memo.parent.nil? %>
<h3><%=l(:label_memo_edit)%></h3>
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
<% if @memo.errors.any? %>
@ -19,8 +20,12 @@
<% end %>
<div class="actions">
<p>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%>
</p>
<% if @memo.parent.nil? && @memo.children.first.nil? %>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
<% else %>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
<% end %>
</p>
<% if User.current.admin?%>
<p>
<% unless @replying %>

View File

@ -82,11 +82,11 @@
:html => {:id => 'news-form', :multipart => true} do |f| %>
<%= render :partial => 'news/form', :locals => {:f => f} %>
<%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit -->
<%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
<%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
|
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
<% end if @project %>
<div id="preview" class="wiki"></div>
</div>

View File

@ -39,8 +39,12 @@
</ul>
</div>
<div class="ur_editor_footer">
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">取消</a>
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div>

View File

@ -36,8 +36,12 @@
</ul>
</div>
<div class="ur_editor_footer">
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">取消</a>
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑多选 end-->

View File

@ -7,8 +7,12 @@
<textarea name="polls_description" maxlength="300" id="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea>
</div>
<div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="pollsCancel();">取消</a>
<a class="btn_submit" data-button="ok" onclick="pollsSubmit($(this));">
<%= l(:label_button_ok)%>
</a>
<a class="btn_cancel" data-button="cancel" onclick="pollsCancel();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑头部 end-->

View File

@ -20,8 +20,12 @@
<!--<label>高 <input name="rows" type="number" min="1" value="5"> 行</label>-->
</div>
<div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">取消</a>
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑多行文字end-->

View File

@ -16,8 +16,12 @@
<label for="ur_question_require">必答</label>
</div>
<div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">取消</a>
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn_cancel" data-button="cancel" onclick="resetQuestion<%=poll_question.id%>();pollQuestionCancel(<%= poll_question.id%>);">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑单行文字end-->

View File

@ -34,8 +34,12 @@
</ul>
</div>
<div class="ur_editor_footer">
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">取消</a>
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div>

View File

@ -33,8 +33,12 @@
</ul>
</div>
<div class="ur_editor_footer">
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">取消</a>
<a class="btn btn_dark btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn btn_light btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div>

View File

@ -13,8 +13,12 @@
<!--<label>高 <input name="rows" type="number" min="1" value="5"> 行</label>-->
</div>
<div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">取消</a>
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑多行文字end-->

View File

@ -8,8 +8,12 @@
<label for="ur_question_require">必答</label>
</div>
<div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">取消</a>
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">
<%= l(:label_button_ok)%>
</a>
<a class="btn_cancel" data-button="cancel" onclick="$(this).parent().parent().parent().remove();">
<%= l(:button_cancel)%>
</a>
</div>
<div class="cl"></div>
</div><!--编辑单行文字end-->

View File

@ -22,7 +22,7 @@
<% end %>
<%if @is_teacher%>
<% if poll.polls_status == 1 %>
<% if poll.polls_status == 1 || poll.polls_status == 3 %>
<li class="pollsbtn fl ml10 pollsbtn_grey">统计结果</li>
<% elsif poll.polls_status == 2%>
<li>
@ -31,38 +31,61 @@
<% end%>
<% end%>
<li>
<%if @is_teacher %>
<%if @is_teacher %>
<% if poll.polls_status == 1 %>
<a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>);">发布问卷</a>
<li>
<a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>);">
发布问卷
</a>
</li>
<% elsif poll.polls_status == 2%>
<a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">取消发布</a>
<li>
<a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">
取消发布
</a>
</li>
<% else%>
<li class="pollsbtn fl ml10 pollsbtn_grey">
发布问卷
</li>
<% end%>
<% end%>
</li>
<% end%>
<li>
<% if @is_teacher %>
<!--新建状态的问卷可删除-->
<%= link_to(l(:button_delete), poll,
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %>
method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml15 mr10") %>
<% end%>
</li>
<li>
<% if @is_teacher%>
<% if poll.polls_status == 1 %>
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%>
<% elsif poll.polls_status == 2%>
<li class="polls_de_grey fr ml20">编辑</li>
<% end%>
<% if @is_teacher%>
<% if poll.polls_status == 1 %>
<li>
<%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml15"%>
</li>
<% else%>
<li class="polls_de_grey fr ml15">
编辑
</li>
<% end%>
</li>
<!--<li>-->
<!--<% if @is_teacher && poll.polls_status == 2%>-->
<!--<a class="polls_de fr ml20" onclick="republish_poll(<%= poll.id%>);">-->
<!--取消发布-->
<!--</a>-->
<!--<% end %>-->
<!--</li>-->
<% end%>
<% if @is_teacher%>
<% if poll.polls_status == 2 %>
<li>
<a class="polls_de fr ml15" onclick="close_poll(<%= poll.id%>);">关闭</a>
</li>
<% else %>
<li class="polls_de_grey fr ml15">
关闭
</li>
<% end%>
<% end %>
<li class="polls_date fr mr10">
<%= format_time poll.created_at%>
</li>

View File

@ -25,6 +25,10 @@
}
//问卷头
function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();}
function pollsSubmit(doc){
var title = $.trim($("#polls_title").val());
if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();}
}
function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();}
//
function pollQuestionCancel(question_id){
@ -57,15 +61,22 @@
function poll_submit()
{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','115px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
var title = $.trim($("#polls_name_h").html());
if(title.length == 0)
{
alert("问卷标题不能为空");
}
else{
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}
</script>
</head>

View File

@ -1,7 +1,7 @@
<div class="ur_page_head ur_editor02"><!--头部显示 start-->
<a href="#" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a>
<h1 class="ur_page_title" id="polls_name_h">
<%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>
<%= poll.polls_name%>
</h1>
<p class="ur_prefix_content" id="polls_description_p">
<%= @poll.polls_description%>

View File

@ -0,0 +1,2 @@
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
alert("关闭成功");

View File

@ -15,7 +15,7 @@
"</div>" +
"</div>");
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','115px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
@ -26,22 +26,53 @@
function clickCanel(){hideModal("#popbox02");}
function poll_submit(poll_id)
function poll_submit(poll_id,poll_name)
{
$('#ajax-modal').html("<div id='popbox02'>" +
"<div class='upload_con'>" +
"<div class='upload_box'>" +
if(poll_name == 0)
{
alert("问卷标题不能为空");
}
else
{
$('#ajax-modal').html("<div id='popbox02'>" +
"<div class='upload_con'>" +
"<div class='upload_box'>" +
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
"<div class='polls_btn_box'>" +
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" +
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" +
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" +
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" +
"</div>" +
"<div class='cl'></div>" +
"</div>" +
"</div>" +
"</div>");
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}
function close_poll(poll_id)
{
$('#ajax-modal').html("<div id='popbox02'>" +
"<div class='upload_con'>" +
"<div class='upload_box'>" +
"<p class='polls_box_p'>问卷关闭后学生将不能继续提交问卷,<br />是否确定关闭该问卷?</p>" +
"<div class='polls_btn_box'>" +
"<a href='/poll/"+ poll_id +"/close_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" +
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" +
"</div>" +
"</div>" +
"</div>");
"<div class='cl'></div>" +
"</div>" +
"</div>" +
"</div>");
showModal('ajax-modal', '310px');
$('#ajax-modal').css('height','115px');
$('#ajax-modal').css('height','120px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");

View File

@ -2,34 +2,43 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= l(:label_poll_result) %></title>
<title>
<%= l(:label_poll_result) %>
</title>
<%= stylesheet_link_tag 'polls', :media => 'all' %>
</head>
<body>
<div class="polls_content polls_box" id="polls">
<div class="ur_page_head" >
<h1 class="ur_page_title"><%= @poll.polls_name %> <%= l(:label_poll) %></h1>
<h1 class="ur_page_title">
<%= @poll.polls_name %>
<%= l(:label_poll) %>
</h1>
</div>
<div class="">
<% @poll_questions.each do |poll_question| %>
<ol>
<li class="ur_question_item">
<div class="ur_title_result">
<span class="title_index">第<%= poll_question.question_number %>题:</span><%= poll_question.question_title %> <span class="title_index">[<%= options_show(poll_question.question_type) %>]</span>
</div>
<% if poll_question.question_type == 1 || poll_question.question_type == 2 %>
<%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %>
<% else %>
<%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %>
<% end %>
</li>
</ol>
<% end %>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
<div class="ur_buttons"></div>
<div>
<% @poll_questions.each do |poll_question| %>
<ol style="margin-left: -40px;">
<li class="ur_question_item">
<div class="ur_title_result">
<span class="title_index">
第<%= poll_question.question_number %>题:
</span>
<%= poll_question.question_title %>
<span class="title_index">
[<%= options_show(poll_question.question_type) %>]
</span>
</div>
<% if poll_question.question_type == 1 || poll_question.question_type == 2 %>
<%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %>
<% else %>
<%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %>
<% end %>
</li>
</ol>
<% end %>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>
</div>

View File

@ -1,4 +1,3 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@ -34,7 +33,7 @@
{
hideModal(obj);
$("#new-watcher-form").submit();
alert("申请成功");
// alert("申请成功");
}
function hidden_join_course_form()
@ -60,6 +59,7 @@
<ul>
<li style="padding-top: 15px;">
<span class="tips">项&nbsp;目&nbsp;ID</span>
<input type="hidden" name="project_join" value="1">
<input type="hidden" name="user_id" value="<%= User.current.id%>">
<input class=" width190" name="project_id" id="project_id" type="text" value="" >
<input type="text" style="display: none"/>
@ -67,7 +67,7 @@
<li class="mB5">项目ID是所在项目网址中显示的序号</li>
<li>
<a href="#" class="btn" style="margin-left: 50px;" onclick="submit_form(this);">
<%= l(:label_new_join) %>
<%= l(:label_apply_project) %>
</a>
<a href="#" class="btn" style="margin-left: 20px;" onclick="hideModal(this);">
<%= l(:button_cancel)%>

View File

@ -47,7 +47,7 @@ form #search_type{
<%#完了把上面东西放到 .css 里%>
</style>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right; width: 260px">
<div class="project-search" style="float: right">
<div class='search_widget'>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27, style: "float:left" %>
<%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>

View File

@ -86,7 +86,7 @@ form #search_by
}
</script>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right; width: 260px">
<div class="project-search" style="float: right">
<div class='search_widget' >
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', style:"float:left" %>

View File

@ -17,9 +17,9 @@ module RedmineApp
# -- all .rb files in that directory are automatically loaded.
# verifier if email is real
EmailVerifier.config do |config|
config.verifier_email = "lizanle521@126.com"
end
# EmailVerifier.config do |config|
# config.verifier_email = "lizanle521@126.com"
# end
config.generators do |g|
g.test_framework :rspec,

View File

@ -237,7 +237,7 @@ en:
mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}."
# edit by meng
# emailer
# emailer translation
mail_issue_greetings: "Dear user , Greetings from Trustie"
mail_issue_footer: "Unsubscribe this message?"
mail_issue_title_userin: "in"
@ -249,7 +249,16 @@ en:
mail_issue_attachments: "Attachments"
mail_issue_reply: "Want reply"
#end
# modified by meng
# file_upload translation
label_file_upload: Resource files
label_file_upload_error_messages: "Upload error, please check your network environment, and refresh the page to upload."
button_confirm: Confirm
# shut down and restart course
label_course_closed: Close
label_course_reopen: Reopen
label_course_closed_tips: "Are you sure you want to reopen the course?"
# end
field_name: Name
field_description: Description
field_summary: Summary
@ -345,7 +354,7 @@ en:
field_identity_url: OpenID URL
field_content: Content
field_group_by: Group results by
field_sharing: Sharing
field_sharing: Sharinglable_hot_course
field_parent_issue: Parent task
field_member_of_group: "Assignee's group"
field_assigned_to_role: "Assignee's role"
@ -537,6 +546,63 @@ en:
project_module_calendar: Calendar
project_module_gantt: Gantt
# edit by meng
lable_hot_course: Hot projects
lable_hot_projects: Active courses
lable_user_active: User movements
lable_bar_active: Bar posts
label_project_score: Score
label_course_join_student: Join a course
label_join_project: Join a project
label_contest_modify_settings: Configuration
bale_news_notice: Add a notification
label_field_correct: correct input
label_work_description_lengthlimit: less than 500 characters
label_create_new_projects: Create a project
label_work_scores_people: The total number of users given scores
label_project_new_description: A project can be used to do anything that requires distributed collaboration
label_project_grade: Score
label_user_for_project_grade: Score
label_relation_files: Select an existing resource
# Personal signature tips
label_my_brief_introduction: How are feeling today? Leave your footprints ~
label_submit: Submit
# create course and course info
label_tags_course_name: Course Title
label_new_course_password: Password
label_new_course_description: Description
field_open_student: Student list is public?
label_course_board: Forum
label_course_open_student_info: (Tick as "open list of students," if not open, the external person couldn't see the list of students)
label_teacher_list: Teacher list
label_student_list: Student list
label_export_excel: Export list
label_course_organizers: Institute
label_poll: Questionnaire
# homework info and anonymous info
field_open_anonymous_evaluation: Use anonymous mutual-evaluation
field_evaluation_num: Number of anonymous works sent to each student
label_edit_homework: Update homework
label_homework_list: Work list
label_teacher_score: Teacher's score
label_time: Commit time
label_student_score: Student's score
label_without_score: No evaluated
label_homework_description: Description
label_responses: Messages
lable_has_commit_homework: You have submitted your work
label_user_create_project_homework: created the task
label_commit_limit: Expired but can submit your work
# steam the student
label_current_group: Current group
# DTS Test tool
project_module_dts: DTS Test tool
label_module_share: DTS Test tool
field_dts_test: DTS Test tool
# Feedback module
label_technical_support: Support
label_feedback: Feedback
#end
label_user: User
label_user_plural: Users
label_user_new: New user
@ -570,7 +636,7 @@ en:
label_project_latest: Latest projects
label_issue: Issue
label_issue_new: New issue
label_issue_plural: Issues
label_issue_plural: Issues Tracking
label_issue_view_all: View all issues
label_issues_by: "Issues by %{value}"
label_issue_added: Issue added
@ -618,12 +684,15 @@ en:
label_home: Home
label_my_page: My page
label_my_account: My account
label_my_message: My messages
label_my_message: Msgs
label_my_projects: My projects
label_my_page_block: My page block
label_administration: Administration
label_login: Login
label_logout: Sign out
# edit by meng
# Logout
label_logout: Logout
# end
label_help: Help
label_reported_issues: Reported issues
label_assigned_to_me_issues: Issues assigned to me
@ -1249,6 +1318,7 @@ en:
#fq
button_leave_meassge: Submit
button_clear_meassge: Reset
label_leave_message_to: leave %{name} a message
label_leave_message: Message content
label_message: message board
@ -1350,9 +1420,9 @@ en:
label_leave_others_message: leave message to him/her
label_leave_a_message: Leave him/her a message
label_leave_your_message: Leave a message to you
label_new_activities: ' has new activity in' # modified by bai
label_new_activity: ' has new activity in'
label_i_new_activity: ' have new activity in'
label_new_activities: ' has a new activity in' # modified by bai
label_new_activity: ' has a new activity in'
label_i_new_activity: ' have a new activity in'
label_create_project: had participated in
label_praise: praise
label_cancel_praise: cancel praise
@ -1631,7 +1701,7 @@ en:
label_bids_form_contest_new_description: Enterprise or college can release a contest here.
label_contest_name: Input the name of the contest
label_contest_description: Contentdescription your contest
label_main_teacher: Main teacher
label_main_teacher: Lecturer
label_main_term: Term
label_teacher_work_unit: Position
label_course_overview: Status
@ -1698,7 +1768,7 @@ en:
label_reply_empty: Reply Cann't Empty.
label_setup_time: Start date
label_endup_time: Over date
label_class_period: Class hour
label_class_period: Lessons
label_class_hour: period
label_activity_time: publish date

View File

@ -252,7 +252,7 @@ zh:
mail_body_wiki_content_updated: "'%{id}' wiki页面已由 %{author} 更新。"
# edit by meng
# emailer
# 邮件中文格式
mail_issue_greetings: "亲爱的Trustie用户您好"
mail_issue_footer: "退订该邮件!"
mail_issue_title_userin: "在"
@ -263,8 +263,17 @@ zh:
mail_issue_from_project: "项目问题跟踪"
mail_issue_attachments: "附件:"
mail_issue_reply: "我要回复"
#end
# end
# modified by meng
# 课程资源上传
label_file_upload: 资源文件
label_file_upload_error_messages: "上传出现错误,请您检查您的网络环境,并刷新页面重新上传。"
button_confirm: 确认
# 教师权限课程关闭和重启
label_course_closed: 关闭
label_course_reload: 重开
label_course_closed_tips: "确定要%{desc}课程?"
# end
field_name: 名称
#added by huang
field_tea_name: 教师
@ -587,7 +596,7 @@ zh:
label_project_latest: 最近的项目
label_issue: 问题
label_issue_new: 新建问题
label_issue_plural: 缺陷
label_issue_plural: 问题跟踪
label_issue_view_all: 查看所有问题
label_issues_by: "按 %{value} 分组显示问题"
label_issue_added: 问题已添加
@ -1030,7 +1039,7 @@ zh:
label_user_activities_other: 该用户暂无任何动态!
label_project_overview: "概述"
label_project_tool: "项目工具集"
label_project_issues: "缺陷"
label_project_issues: "问题"
label_project_newother: "查看其他评论"
label_project_newshare: "分享了"
label_project_notice: "发布了通知:"

View File

@ -67,6 +67,7 @@ RedmineApp::Application.routes.draw do
get 'publish_poll'
get 'republish_poll'
get 'poll_result'
get 'close_poll'
end
collection do
delete 'delete_poll_question'

View File

@ -0,0 +1,9 @@
class AddShowResult < ActiveRecord::Migration
def up
add_column :polls, :show_result, :integer, default: 1
end
def down
remove_column :polls, :show_result
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150121030451) do
ActiveRecord::Schema.define(:version => 20150123020615) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -23,18 +23,6 @@ ActiveRecord::Schema.define(:version => 20150121030451) do
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
create_table "api_keys", :force => true do |t|
t.string "access_token"
t.datetime "expires_at"
t.integer "user_id"
t.boolean "active", :default => true
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
create_table "applied_projects", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false
@ -844,9 +832,10 @@ ActiveRecord::Schema.define(:version => 20150121030451) do
t.integer "user_id"
t.datetime "published_at"
t.datetime "closed_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "polls_description"
t.integer "show_result", :default => 1
end
create_table "praise_tread_caches", :force => true do |t|

View File

@ -2916,4 +2916,5 @@ input[class~='m3p10'], .m3p10 {
height: 20px;
display: inline-block;
color: #ffffff;
cursor:pointer;
}

View File

@ -1,17 +1,17 @@
/* CSS Document */
#polls{ font-size:12px; font-family:"微软雅黑","宋体" !important; 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{ margin:0; padding:0;}
#polls div,img,tr,td{ border:0;}
#polls table,tr,td{border:0; cellspacing:0; cellpadding:0;}
#polls ul,li{ list-style-type:none}
#polls .cl{ clear:both; overflow:hidden; }
#polls a{ text-decoration:none; }
#polls a:hover{ text-decoration:underline; }
#polls .ml10{ margin-left:10px;}
#polls .ml20{ margin-left:20px;}
#polls .mr10{ margin-right:10px;}
#polls .fl{ float: left;}
#polls .fr{ float:right;}
div,img,tr,td{ border:0;}
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
ul,li{ list-style-type:none}
.cl{ clear:both; overflow:hidden; }
a{ text-decoration:none; }
a:hover{ text-decoration:underline; }
.ml10{ margin-left:10px;}
.ml20{ margin-left:20px;}
.mr10{ margin-right:10px;}
.fl{ float: left;}
.fr{ float:right;}
/*问卷按钮*/
/*.polls_btn{ height:33px;border-top:1px solid #15bed1; border-bottom:1px solid #15bed1;border-right:1px solid #cee6e6; width:225px; padding:7px 0 0 15px; }*/
@ -31,7 +31,7 @@ a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 300px;white-space: now
a.pollsbtn{ display:block; width:66px; height:22px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;}
a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;}
.polls_date{ color:#666666;}
.polls_de{ color:#6883b6;}
.polls_de{ color:#6883b6;padding-left: 5px;}
/****翻页***/
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
ul.wlist li{float: left;}
@ -41,7 +41,7 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
/*问卷页面*/
.polls_box{ border:1px solid #dcdcdc; padding:15px 30px;}
.polls_box{ border:1px solid #dcdcdc; padding:15px 30px;margin-left: 7px;}
.ur_page_title{ font-size:16px; text-align:center; color:#353535; word-break:break-all; word-wrap:break-word;}
.ur_prefix_content{ color:#656565; text-indent:30px; margin-top:10px; }
.ur_card{border-top:1px solid #dcdcdc;margin-top:20px; color:#3a3a3a;}
@ -113,7 +113,7 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
.ur_editor_toolbar{ margin-bottom:10px;}
.ur_editor_toolbar input{ width:40px; height:20px;}
.ur_editor02{width:655px; border:1px solid #cbcbcb; padding:10px; margin-bottom:10px;}
.ur_editor02{width:655px; padding:10px; margin-bottom:10px;}
a.ur_button_submit{ display:block; width:106px; height:37px; margin:0 auto; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:3px; margin-bottom:10px; }
a:hover.ur_button_submit{ background:#0fa9bb; text-decoration:none;}
a.ur_icon_de{ background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:right; margin-top:15px;}
@ -143,5 +143,5 @@ a.btn_pu{ border:1px solid #3cb761; color:#3cb761; }
a:hover.btn_pu{ background:#3cb761;}
.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; }
.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_de_grey{ color:#b1b1b1;}
.polls_de_grey{ color:#b1b1b1;padding-left: 5px;}
.ml5{ margin-left:5px;}

10
spec/factories/users.rb Normal file
View File

@ -0,0 +1,10 @@
require 'faker'
FactoryGirl.define do
factory :user do
login "ExampleUser"
mail "user@example.com"
password "foobar"
password_confirmation "foobar"
end
end

140
spec/models/user_spec.rb Normal file
View File

@ -0,0 +1,140 @@
require 'spec_helper'
describe User do
#测试数据验证
# before { @user = User.new(login: "ExampleUser" ,mail: "user@example.com",
# password: "foobar",password_confirmation: "foobar" ) }
before :each do
@user = User.new(login: "ExampleUser" ,mail: "user@example.com",
password: "foobar",password_confirmation: "foobar" )
end
subject { @user }#指定@user为测试对象
#属性存在性的测试
it { should respond_to(:login) }
it { should respond_to(:mail) }
#此处采用与构建的方式生成数据
# it"is invalid without login" do
# user=FactoryGirl.build(:user,login: nil)
# expect(user).to_not be_valid
# end
#用户名唯一性的测试
describe "when login is already taken" do
before do
user_with_same_login=@user.dup
user_with_same_login.save
end
it{should_not be_valid}
# it "should be valid" do
# expect(@user).to be_valid
# end
end
#邮箱唯一性测试
describe "when mail address is already taken " do
before do
user_with_same_mail=@user.dup#dup method copy mail
user_with_same_mail.mail=@user.mail.upcase#转大写
user_with_same_mail.save
end
it{should_not be_valid}
end
#邮箱唯一性测试2
# describe " is invalid with a same email address" do
# User.create(login:'peter',mail:'test@qq.com')#先保存一个合法的对象
# user1=User.new(login:'jim',mail:'testqq@.com')#再创建user1作为测试的对比对象
# # expect(user1).to have(1).errors_on(:mail)
# it{should_not be_valid}
# end
#login长度测试(login最大25字符)
describe "when the login is too long " do
before{@user.login='a'*25}
it{should be_valid}
end
#姓和名的长度测试
describe "when the first name is too long " do
before{@user.firstname='a'*30}
it{should_not be_valid}
end
describe "when the last name is too long " do
before{@user.lastname='a'*30}
it{should_not be_valid}
end
#login合法性的测试(符合正则表达式规则的用户名:数字英文)
describe "when login format is invalid" do
it"should be invalid" do
username=%w[aa!3 aaa%$&*! 1111==!]
username.each do |valid_username|
@user.login=valid_username
expect(@user).not_to be_valid
end
end
end
describe "when login format is valid" do
it"should be valid" do
username = %w[jim123 123456 aaaaaa]
username.each do |valid_username|
@user.login=valid_username
expect(@user).to be_valid
end
end
end
#邮箱合法性测试在模型user中邮箱使用了正则表达式
describe "is the mail valid" do
context "when mail format is invalid" do
it"should be invalid" do
address=%w[user@foo,com user_at_foo.org example.user@foo.foo@bar_baz.com foo@bar+baz.com]
address.each do |valid_address|
@user.mail=valid_address
expect(@user).not_to be_valid
end
end
end
context "when mail format is valid" do
it"should be valid" do
addresses = %w[user@foo.COM A_US-ER@f.b.org frst.lst@foo.jp a+b@baz.cn]
addresses.each do |valid_address|
@user.mail=valid_address
expect(@user).not_to be_valid
end
end
end
end
describe "when the mail is too long" do#邮箱长度验证的测试
before{@user.mail='a'*60}
it{should_not be_valid}
end
#验证两次输入的密码是否一致的测试
describe "when the password does not match confirmation" do
before{@user.password_confirmation="admin123"}
it{should_not be_valid}
end
#调用相关方法是否能返回期待的结果
#userInfo方法选择项目成员时显示的用户信息的文字
describe "returns the user info when choice the members of the project" do
context "第一种情况" do
@user=User.new()
expect(@user.userInfo).to eq ''
end
context "二种情况" do
@user=User.new()
expect(@user.userInfo).to eq ''
end
end
# def name
# [firstname, lastname].join(' ')
# end
# it "returns a contact's full name as a string" do
# contact = Contact.new(firstname: 'John', lastname: 'Doe',
# email: 'johndoe@example.com')
# expect(contact.name).to eq 'John Doe'#调用contact的name方法
# end
end