From a145f04c2729d2ceb2c6984bb60019c5bca19625 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Tue, 20 Jan 2015 16:56:23 +0800 Subject: [PATCH 01/29] =?UTF-8?q?=E5=9C=A8gemfile=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0rspec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .metadata/.log | 57 +++ .../.plugins/com.aptana.core.io/connections.9 | 2 - .../defaultConnection.9 | 7 - .../.plugins/com.aptana.syncing.core/sites.9 | 2 - .../com.aptana.webserver.core/webservers.8 | 6 - .../.root/.indexes/properties.index | Bin 104 -> 104 bytes .../org.eclipse.core.resources/.root/2.tree | Bin 4837 -> 0 bytes .../.safetable/com.aptana.core.io.9 | 3 - .../.safetable/com.aptana.syncing.core.9 | 4 - .../.safetable/com.aptana.webserver.core.8 | 3 - .../.safetable/org.eclipse.core.resources | Bin 866 -> 902 bytes .../.settings/com.aptana.explorer.prefs | 2 +- .../.settings/com.aptana.portal.ui.prefs | 2 +- .../.settings/com.aptana.theme.prefs | 2 +- .../.settings/org.eclipse.ui.ide.prefs | 2 +- .../Firefox - Internal Server.launch | 2 +- .../org.eclipse.ui.ide/dialog_settings.xml | 10 +- .../org.eclipse.ui.workbench/workbench.xml | 54 +-- Gemfile | 3 + .../stylesheets/window_js/nuncio.css | 328 +++++++++--------- .../stylesheets/window_js/spread.css | 216 ++++++------ 21 files changed, 371 insertions(+), 334 deletions(-) delete mode 100644 .metadata/.plugins/com.aptana.core.io/connections.9 delete mode 100644 .metadata/.plugins/com.aptana.syncing.core/defaultConnection.9 delete mode 100644 .metadata/.plugins/com.aptana.syncing.core/sites.9 delete mode 100644 .metadata/.plugins/com.aptana.webserver.core/webservers.8 delete mode 100644 .metadata/.plugins/org.eclipse.core.resources/.root/2.tree delete mode 100644 .metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.core.io.9 delete mode 100644 .metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.syncing.core.9 delete mode 100644 .metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.webserver.core.8 diff --git a/.metadata/.log b/.metadata/.log index 0cb16378c..ea77ea8b9 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -209,3 +209,60 @@ 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-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-17 11:30:37.624 +!MESSAGE Workspace restored, but some problems occurred. +!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. + at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:851) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:874) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:854) + at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:703) + at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1528) + at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2503) + at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2251) + at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:439) + at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702) + at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) + at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) + at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440) + at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268) + at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107) + at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463) + at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) + at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) + at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) + at java.lang.ClassLoader.loadClass(Unknown Source) + at com.aptana.rcp.IDEApplication.start(IDEApplication.java:125) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) + at java.lang.reflect.Method.invoke(Unknown Source) + 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-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 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 diff --git a/.metadata/.plugins/com.aptana.core.io/connections.9 b/.metadata/.plugins/com.aptana.core.io/connections.9 deleted file mode 100644 index 4371c4759..000000000 --- a/.metadata/.plugins/com.aptana.core.io/connections.9 +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.9 b/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.9 deleted file mode 100644 index 375897785..000000000 --- a/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.9 +++ /dev/null @@ -1,7 +0,0 @@ - - - -Default -file:/C:/Users/nudt - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.syncing.core/sites.9 b/.metadata/.plugins/com.aptana.syncing.core/sites.9 deleted file mode 100644 index d9b475695..000000000 --- a/.metadata/.plugins/com.aptana.syncing.core/sites.9 +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.webserver.core/webservers.8 b/.metadata/.plugins/com.aptana.webserver.core/webservers.8 deleted file mode 100644 index 5c07542b1..000000000 --- a/.metadata/.plugins/com.aptana.webserver.core/webservers.8 +++ /dev/null @@ -1,6 +0,0 @@ - - - -demo - - \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index fddafcbcdbdf00ea71be4159adb7de4db58439ac..83f5328beecdc2fbc707c3bf8708420669396cef 100644 GIT binary patch delta 17 Ycmd1Em=MEbVq{=yWMOD*Xl8B*04pK{F#rGn delta 17 Ycmd1Em=MEbY-wU@WM*t`WMX6r04tRQJpcdz diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/2.tree deleted file mode 100644 index 5b2529389243f247a5e2c6f799eb40d3d01d5bfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4837 zcmai&*?QAf5XVP$;;e)aw$hc-vXp{wVmk@Yg+LO@PSbrg$I`K*M3#&s2h!_4Lf@cw zz3N3Dft$WU-=V$h6&LAWwly9*QZpCP=TE;`&dfPyMj6THa@3XW-ZSlC(1@*@KAo}r zrm0$y@|5Y=+O+&Yn{CgjJKDb4c3fKrvAU5n$cUeb9)64*#qZVMt$$zi9E|jyoyQza znhhs%8Xhb{cg{dqG5#_MuORR-qH(ho_*>eF0FNXv+a3iR2M`P3vD>;?cihCJ_0C+SZxT0AQIU z%Bxl@UP)Y~fpp*<%T$31DhzcLrlN-!B$~-n!D*_7PDjrQ^qfHxfpXl?YsTsse9zp91KM94m}R*L7h$yP>TpwMt@S+9L>CM? zEL~V(x)0c8c^^J3--`m@b#;)Qq#34(4jXhz_^9@E&7hXLqIZQh(ml4R-By;T!-AbP z=(zOM)ywkoj?je1u_g+cy{<9)aP7@iR@oD`bAt=;rI9TDiFSOE~rB2K*a zcAUWXn%W!o@iK`AF|Ztm51}$xgG2!k%ZWVA*m_61e(V2yyv_-;pl>5~G^#SuJ*8&QmIs3y{j{Lb6LWTaLGyX$ zXwd>#F6HQ`+}q((*NJoqddbabUrx3jMgf)|(dI*~?cwsWlO;xpmeJ{@QzcnJFSOmo`D{B`D0WT+6u08UC74 zB9wD9QsMUCzDUeo6Xf-S%zh-O~GBsrFS!iuM7ACoHAMKu7f1MPyhL= z$D+2B%&rz%L#tiG6f>}uk_BE7=8FXyFBi+5wgZ?)9gYS5Sw6)6DK9K!!vI)50$eE; zvta-%A7j9&s~rbN#l#=6lP!(}49g9oNyoGG^KA1#SXO`se$9_UGkPA+=1Kng)`76x zME<%HV`~123=+*7G};+QQhu2d#F4Q6dDDkD3D?SnPd4aHSC%wUo7)o{u|%yo>g>|5J>Oek#z79OZAV7e$Jn z{+)c}YQfbF%CD}ZbB^G)47wCzsfTj>Ed1h+XHpkAokSL^otyj3i#%JPC` z*J`?CFPBxRqI7zIo5CPgKhkn+*<9?4H+n!-fKLpX40W)h0~5Sl_-}vqFk9frKDu{j zc1pMXM8FEePuNYm$W%WLyl1K5y4%s7?FRz2_FnXW5`#qL^p2dMcLjPcm-*?<8}EVO zA0Bi>9trp{E`*GaZjSq*;2&ifPa=mw795AMmfLPPp3HMUA@`Uhx_^-2`vQIt=NJEd G>dJrd5!RXj diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.core.io.9 b/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.core.io.9 deleted file mode 100644 index 0b4ef3b47..000000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.core.io.9 +++ /dev/null @@ -1,3 +0,0 @@ -#safe table -#Tue Mar 11 17:27:27 CST 2014 -connections=connections.9 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.syncing.core.9 b/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.syncing.core.9 deleted file mode 100644 index 371e94161..000000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.syncing.core.9 +++ /dev/null @@ -1,4 +0,0 @@ -#safe table -#Tue Mar 11 17:27:27 CST 2014 -defaultConnection=defaultConnection.9 -sites=sites.9 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.webserver.core.8 b/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.webserver.core.8 deleted file mode 100644 index 1af4b85d6..000000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.safetable/com.aptana.webserver.core.8 +++ /dev/null @@ -1,3 +0,0 @@ -#safe table -#Tue Mar 11 17:27:27 CST 2014 -webservers=webservers.8 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index b3b591e284d378d05220aa1d474a6235416d77f8..b756a6952de4f1f180ee8f4487b792a0aeb5a8bc 100644 GIT binary patch delta 193 zcmaFF*2X?TK_)n{M8PXDPr=Y!!O+mk*x1U{Ou;!gM8U|w&~&2BYDVM90*n%q82OnD z4S+0FK|>>6F8!3$+Pq5|fx&CkHcnFc}(6p2KKFz)1DUtjt0a=Lk(U lWlBLZ-4J5BF*eivMGS%B2O@rdR^G!PA{F?#r+Rn!F#u2aGkpL6 delta 155 zcmZo;f5bLHK_;X$Rlzs0NWsuh!O+~w2!s@zgF_UI3=B;s>oQAB44KSmG+B^QViF@i zqdAbF%4h);mzkW*=m})4V>BXY#AFes=?F6{z-Cy2%}{6d7PjQ&IuP;uv+^DW5vjn> KJ=MF*j{yLaxhOIK diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs index 752d73cf4..992cdf2bf 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs @@ -1,2 +1,2 @@ -activeProject=demo +activeProject=trustie eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.portal.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.portal.ui.prefs index a710d7ff4..e78c19c52 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.portal.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.portal.ui.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -last_known_studio_version=3.4.0.1358388620 +last_known_studio_version=3.4.2.1368863613 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs index 590c84632..bc6c0d7c7 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs @@ -1,7 +1,7 @@ ACTIVE_HYPERLINK_COLOR=84,143,160 ACTIVE_THEME=Aptana Studio HYPERLINK_COLOR=84,143,160 -THEME_CHANGED=1394527579080 +THEME_CHANGED=1421465443240 eclipse.preferences.version=1 hyperlinkColor=84,143,160 hyperlinkColor.SystemDefault=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index 71a846af6..310adab05 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -2,6 +2,6 @@ PROBLEMS_FILTERS_MIGRATE=true SHOW_COOLBAR=true SHOW_PERSPECTIVEBAR=true eclipse.preferences.version=1 -platformState=1394526372425 +platformState=1420528131671 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch index 678ced8a0..08a9581b9 100644 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch +++ b/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch @@ -3,7 +3,7 @@ - + diff --git a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml index 4868ecd96..eba54f80b 100644 --- a/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -1,14 +1,14 @@
- - - - + + + + - +
diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml index 88eaacee1..cd47216f4 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml @@ -1,5 +1,5 @@ - + @@ -8,14 +8,14 @@ - + - - - + + + - + @@ -37,7 +37,7 @@ demo -E:\code\demo +C:\Users\zh @@ -66,10 +66,10 @@ - - + + - + @@ -78,7 +78,7 @@ - + @@ -124,14 +124,19 @@ - - - - + + + + + + + + + - + @@ -166,15 +171,11 @@ - - - - - - - - - + + + + + @@ -188,6 +189,9 @@ + + + diff --git a/Gemfile b/Gemfile index 6c2101345..2c1f05857 100644 --- a/Gemfile +++ b/Gemfile @@ -52,6 +52,9 @@ group :development, :test do gem 'pry' gem 'pry-nav' + gem 'rspec-rails' , '2.13.1' + gem 'guard-rspec','2.5.0' + end diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css index e2700e5b7..2c439bd00 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css @@ -1,164 +1,164 @@ -.overlay_nuncio img { border: none; } - -.overlay_nuncio { - background-color: #666666; -} - -.nuncio_nw { - width: 12px; - height: 28px; - background: url(nuncio/top_left.png) no-repeat; -} - -.nuncio_n { - background: url(nuncio/top_mid.png) repeat-x; - height: 28px; -} - -.nuncio_ne { - width: 21px; - height: 28px; - background: url(nuncio/top_right.png) no-repeat; -} - -.nuncio_e { - width: 21px; - background: url(nuncio/center_right.png) repeat-y top right; -} - -.nuncio_w { - width: 12px; - background: url(nuncio/center_left.png) repeat-y top left; -} - -.nuncio_sw { - width: 12px; - height: 18px; - background: url(nuncio/bottom_left.png) no-repeat; -} - -.nuncio_s { - background: url(nuncio/bottom_mid.png) repeat-x 0 0; - height: 18px; -} - -.nuncio_se, .nuncio_sizer { - width: 21px; - height: 18px; - background: url(nuncio/bottom_right.png) no-repeat; -} - -.nuncio_close { - width: 14px; - height: 14px; - background: url(nuncio/close.png) no-repeat; - position:absolute; - top:10px; - right:22px; - cursor:pointer; - z-index:2000; -} - -.nuncio_minimize { - width: 14px; - height: 15px; - background: url(nuncio/minimize.png) no-repeat; - position:absolute; - top:10px; - right:40px; - cursor:pointer; - z-index:2000; -} - -.nuncio_title { - float:left; - font-size:11px; - font-weight: bold; - font-style: italic; - color: #fff; - width: 100% -} - -.nuncio_content { - background: url(nuncio/overlay.png) repeat; - overflow:auto; - color: #ddd; - font-family: Tahoma, Arial, "sans-serif"; - font-size: 10px; -} - -.nuncio_sizer { - cursor:se-resize; -} - - -.top_draggable, .bottom_draggable { - cursor:move -} -/* FOR IE */ -* html .nuncio_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); -} - -* html .nuncio_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); -} - -* html .nuncio_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); -} - -* html .nuncio_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); -} - -* html .nuncio_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); -} - -* html .nuncio_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); -} - -* html .nuncio_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); -} - -* html .nuncio_se { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); -} - -* html .nuncio_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); -} - -* html .nuncio_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); -} - -* html .nuncio_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); -} - +.overlay_nuncio img { border: none; } + +.overlay_nuncio { + background-color: #666666; +} + +.nuncio_nw { + width: 12px; + height: 28px; + background: url(nuncio/top_left.png) no-repeat; +} + +.nuncio_n { + background: url(nuncio/top_mid.png) repeat-x; + height: 28px; +} + +.nuncio_ne { + width: 21px; + height: 28px; + background: url(nuncio/top_right.png) no-repeat; +} + +.nuncio_e { + width: 21px; + background: url(nuncio/center_right.png) repeat-y top right; +} + +.nuncio_w { + width: 12px; + background: url(nuncio/center_left.png) repeat-y top left; +} + +.nuncio_sw { + width: 12px; + height: 18px; + background: url(nuncio/bottom_left.png) no-repeat; +} + +.nuncio_s { + background: url(nuncio/bottom_mid.png) repeat-x 0 0; + height: 18px; +} + +.nuncio_se, .nuncio_sizer { + width: 21px; + height: 18px; + background: url(nuncio/bottom_right.png) no-repeat; +} + +.nuncio_close { + width: 14px; + height: 14px; + background: url(nuncio/close.png) no-repeat; + position:absolute; + top:10px; + right:22px; + cursor:pointer; + z-index:2000; +} + +.nuncio_minimize { + width: 14px; + height: 15px; + background: url(nuncio/minimize.png) no-repeat; + position:absolute; + top:10px; + right:40px; + cursor:pointer; + z-index:2000; +} + +.nuncio_title { + float:left; + font-size:11px; + font-weight: bold; + font-style: italic; + color: #fff; + width: 100% +} + +.nuncio_content { + background: url(nuncio/overlay.png) repeat; + overflow:auto; + color: #ddd; + font-family: Tahoma, Arial, "sans-serif"; + font-size: 10px; +} + +.nuncio_sizer { + cursor:se-resize; +} + + +.top_draggable, .bottom_draggable { + cursor:move +} +/* FOR IE */ +* html .nuncio_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); +} + +* html .nuncio_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); +} + +* html .nuncio_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); +} + +* html .nuncio_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); +} + +* html .nuncio_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); +} + +* html .nuncio_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); +} + +* html .nuncio_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); +} + +* html .nuncio_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); +} + +* html .nuncio_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css index d7d722e8a..9bda2a68d 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css @@ -1,108 +1,108 @@ -.overlay_spread { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.spread_nw { - background: transparent url(spread/left-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.spread_n { - background: transparent url(spread/top-middle.gif) repeat-x 0 0; - height:25px; -} - -.spread_ne { - background: transparent url(spread/right-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.spread_w { - background: transparent url(spread/frame-left.gif) repeat-y top left; - width:7px; -} - -.spread_e { - background: transparent url(spread/frame-right.gif) repeat-y top right; - width:7px; -} - -.spread_sw { - background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.spread_s { - background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; - height:7px; -} - -.spread_se, .spread_sizer { - background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.spread_sizer { - cursor:se-resize; -} - -.spread_close { - width: 23px; - height: 23px; - background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:11px; - cursor:pointer; - z-index:1000; -} - -.spread_minimize { - width: 23px; - height: 23px; - background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:55px; - cursor:pointer; - z-index:1000; -} - -.spread_maximize { - width: 23px; - height: 23px; - background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:33px; - cursor:pointer; - z-index:1000; -} - -.spread_title { - float:left; - height:14px; - font-family: Tahoma, Arial, sans-serif; - font-size:14px; - font-weight:bold; - text-align:left; - margin-top:2px; - width:100%; - color:#E47211; -} - -.spread_content { - overflow:auto; - color: #222; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background:#A9EA00; -} - +.overlay_spread { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.spread_nw { + background: transparent url(spread/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_n { + background: transparent url(spread/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.spread_ne { + background: transparent url(spread/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_w { + background: transparent url(spread/frame-left.gif) repeat-y top left; + width:7px; +} + +.spread_e { + background: transparent url(spread/frame-right.gif) repeat-y top right; + width:7px; +} + +.spread_sw { + background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_s { + background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.spread_se, .spread_sizer { + background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_sizer { + cursor:se-resize; +} + +.spread_close { + width: 23px; + height: 23px; + background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.spread_minimize { + width: 23px; + height: 23px; + background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.spread_maximize { + width: 23px; + height: 23px; + background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.spread_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:14px; + font-weight:bold; + text-align:left; + margin-top:2px; + width:100%; + color:#E47211; +} + +.spread_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background:#A9EA00; +} + From f24d0e6b5423f79e156af3d265ac84c48092df42 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Fri, 23 Jan 2015 10:16:46 +0800 Subject: [PATCH 02/29] =?UTF-8?q?user=E6=A8=A1=E5=9E=8B=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rspec | 1 + spec/models/user_spec.rb | 121 +++++++++++++++++++++++++++++++++++++++ spec/spec_helper.rb | 38 ++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 .rspec create mode 100644 spec/models/user_spec.rb create mode 100644 spec/spec_helper.rb diff --git a/.rspec b/.rspec new file mode 100644 index 000000000..4e1e0d2f7 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--color diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb new file mode 100644 index 000000000..6cd75bce6 --- /dev/null +++ b/spec/models/user_spec.rb @@ -0,0 +1,121 @@ +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) } + + #用户名唯一性的测试 + 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_not 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).not_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 + + end + +end \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 000000000..d2cbea7d9 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,38 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV["RAILS_ENV"] ||= 'test' +require File.expand_path("../../config/environment", __FILE__) +require 'rspec/rails' +require 'rspec/autorun' + +# Requires supporting ruby files with custom matchers and macros, etc, +# in spec/support/ and its subdirectories. +Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } + +RSpec.configure do |config| + # ## Mock Framework + # + # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: + # + # config.mock_with :mocha + # config.mock_with :flexmock + # config.mock_with :rr + + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures + config.fixture_path = "#{::Rails.root}/spec/fixtures" + + # If you're not using ActiveRecord, or you'd prefer not to run each of your + # examples within a transaction, remove the following line or assign false + # instead of true. + config.use_transactional_fixtures = true + + # If true, the base class of anonymous controllers will be inferred + # automatically. This will be the default behavior in future versions of + # rspec-rails. + config.infer_base_class_for_anonymous_controllers = false + + # Run specs in random order to surface order dependencies. If you find an + # order dependency and want to debug it, you can fix the order by providing + # the seed, which is printed after each run. + # --seed 1234 + config.order = "random" +end From bb64dc945247ff29b03e1a117cc8d7a5b386f4e2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 10:19:23 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E8=B0=83=E6=9F=A5=E6=8C=89=E9=92=AE=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 466e711c2..06626c155 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -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; } @@ -313,7 +313,7 @@ <%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
-

N

+

NEW

From 15a8bddfe6e70ea5e3eba2bbd763b222cf0d97e9 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 14:02:00 +0800 Subject: [PATCH 04/29] =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 79 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index a7d98a21c..755157245 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -345,7 +345,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" @@ -536,6 +536,70 @@ en: project_module_boards: Forums 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 + + label_my_brief_introduction: How are feeling today? Leave your footprints ~ + label_submit: Submit + + 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 + + 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 + + label_current_group: Current group + + project_module_dts: DTS Test tool + label_module_share: DTS Test tool + field_dts_test: DTS Test tool + + label_technical_support: Support : + label_feedback: Feedback + #end label_user: User label_user_plural: Users @@ -618,7 +682,7 @@ 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 @@ -1249,6 +1313,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 +1415,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 +1696,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: Content:description 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 +1763,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 From 6645648027be82145ed7a0db50cdd1121f6e0d93 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:10:38 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E9=97=AE=E5=8D=B7=E7=BB=93=E6=9E=9C=E8=80=81?= =?UTF-8?q?=E5=B8=88=E5=8F=AF=E9=85=8D=E7=BD=AE=E5=A2=9E=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 1 + db/migrate/20150123020615_add_show_result.rb | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 db/migrate/20150123020615_add_show_result.rb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 4abddaa5e..0ee17222e 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -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 diff --git a/db/migrate/20150123020615_add_show_result.rb b/db/migrate/20150123020615_add_show_result.rb new file mode 100644 index 000000000..0407abceb --- /dev/null +++ b/db/migrate/20150123020615_add_show_result.rb @@ -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 From 2be757a3d581b548b6c51eb0cd1c644531688a25 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 14:19:43 +0800 Subject: [PATCH 06/29] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 755157245..036410a25 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -562,7 +562,7 @@ en: label_tags_course_name: Course Title label_new_course_password: Password label_new_course_description: Description - field_open_student: Student list is public ? + 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 From dbdae2ac7e5d3c4eb654bf684a94a68a5722af82 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:25:29 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=9C=A8=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=92=8C=E7=82=B9=E5=87=BB=E9=97=AE=E5=8D=B7=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 4 ++-- app/views/poll/_edit_head.html.erb | 2 +- app/views/poll/_poll_form.html.erb | 29 ++++++++++++++++++++--------- app/views/poll/_show_head.html.erb | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 0ee17222e..8926c0be6 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -70,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 diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 802832601..ed90a5ef8 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -7,7 +7,7 @@
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index df4859613..1d0dee837 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -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("" + - ""); - $('#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','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } } diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 7ab16b24d..ce74dc10a 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

- <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> + <%= poll.polls_name%>

<%= @poll.polls_description%> From 900cff8f8e51c9b585e7afc5327b198526dd185f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:43:40 +0800 Subject: [PATCH 08/29] =?UTF-8?q?1=E3=80=81=E9=97=AE=E5=8D=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=202=E3=80=81=E5=8E=BB=E6=8E=89=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 2 +- app/views/poll/index.html.erb | 41 ++++++++++++++++++++--------------- config/application.rb | 6 ++--- db/schema.rb | 19 ++++------------ 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index c53f09361..1bf6b3716 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -34,7 +34,7 @@

  • <%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 + 发布问卷 <% elsif poll.polls_status == 2%> 取消发布 <% end%> diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index a8aca1308..3962768da 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -26,28 +26,35 @@ function clickCanel(){hideModal("#popbox02");} - function poll_submit(poll_id) + function poll_submit(poll_id,poll_name) { - $('#ajax-modal').html("
    " + - "
    " + - "
    " + + if(poll_name == 0) + { + alert("问卷标题不能为空"); + } + else + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + "
    " + - "确  定" + - "取  消" + + "确  定" + + "取  消" + "
    " + "
    " + - "
    " + - "
    " + - "
    "); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } }
    diff --git a/config/application.rb b/config/application.rb index 2f1534d00..7e47cc64e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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, diff --git a/db/schema.rb b/db/schema.rb index d0d755bd3..20c74ba1e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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| From 61634585f5c59f37510a75688c8c81d9b7aca495 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 23 Jan 2015 14:51:11 +0800 Subject: [PATCH 09/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8Anews=EF=BC=8Cf?= =?UTF-8?q?orum=E6=A8=A1=E5=9D=97=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E6=9D=BF=E3=80=8B=20Signed-off-by:=20alan=20?= =?UTF-8?q?<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/mailer.rb | 14 +++++- app/views/mailer/forum_add.html.erb | 31 +++++++++++-- app/views/mailer/forum_message_added.html.erb | 34 +++++++++++++-- .../mailer/journals_for_message_add.html.erb | 28 ++++++++++-- app/views/mailer/message_posted.html.erb | 5 ++- app/views/mailer/news_added.html.erb | 43 +++++++++++++++++-- app/views/mailer/news_comment_added.html.erb | 41 ++++++++++++++++-- config/application.rb | 6 +-- 8 files changed, 179 insertions(+), 23 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 1760d9004..f42c20acc 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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 } diff --git a/app/views/mailer/forum_add.html.erb b/app/views/mailer/forum_add.html.erb index 8da8b7891..7e26fd0df 100644 --- a/app/views/mailer/forum_add.html.erb +++ b/app/views/mailer/forum_add.html.erb @@ -1,4 +1,29 @@ -

    <%= link_to(h(@forum.name), @forum_url) %>

    -<%=h @forum.creator.name %> -<%= @forum.description.html_safe %> \ No newline at end of file +

    + + <%= link_to(h("#{@forum.creator.login}(#{@forum.creator.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:label_forum_new)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • + +
    • <%= l(:mail_issue_content)%> + + <%= @forum.description.html_safe %> + +
    • + +
    +
    + +
    +
    + + + diff --git a/app/views/mailer/forum_message_added.html.erb b/app/views/mailer/forum_message_added.html.erb index 743c06ae7..58657d46b 100644 --- a/app/views/mailer/forum_message_added.html.erb +++ b/app/views/mailer/forum_message_added.html.erb @@ -1,4 +1,32 @@ -

    <%= link_to(h(@memo.subject), @memo_url) %>

    -<%=h @memo.author.name %> -<%= @memo.content.html_safe %> \ No newline at end of file +

    + + <%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> + + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_active)%>

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@memo.subject), @memo_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • +
    • <%= l(:mail_issue_sent_from)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +
    • +
    • <%= l(:mail_issue_content)%> + + <%= @memo.content.html_safe %> + +
    • + +
    +
    + +
    +
    + + + diff --git a/app/views/mailer/journals_for_message_add.html.erb b/app/views/mailer/journals_for_message_add.html.erb index f39b49026..cfb288d9d 100644 --- a/app/views/mailer/journals_for_message_add.html.erb +++ b/app/views/mailer/journals_for_message_add.html.erb @@ -1,5 +1,25 @@ -尊敬的用户,<%= @user %>给你留言了: -
    <%= @message %>
    -

    点击链接查看最新回复<%= link_to(@url, @url) %> -         <%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%>

    + +

    + + + <%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + 给你留言了 +

    +
    +
      + +
    • <%= l(:mail_issue_content)%> + + <%= @message %> + +
    • + +
    +
    + +
    +
    + diff --git a/app/views/mailer/message_posted.html.erb b/app/views/mailer/message_posted.html.erb index 1fe28e04f..dbe41976a 100644 --- a/app/views/mailer/message_posted.html.erb +++ b/app/views/mailer/message_posted.html.erb @@ -1,7 +1,8 @@

    - <%= 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;') %> + <%= l(:mail_issue_title_userin)%> <% if @message.project %> @@ -29,7 +30,7 @@

    diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb index 758ebccb8..ca8f3c1b0 100644 --- a/app/views/mailer/news_added.html.erb +++ b/app/views/mailer/news_added.html.erb @@ -1,4 +1,41 @@ -

    <%= link_to(h(@news.title), @news_url) %>

    -<%=h @news.author.name %> -<%= textilizable(@news, :description, :only_path => false) %> +

    + + + <%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% 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 %> + <%= l(:mail_issue_title_active)%>

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • +
    • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
    • +
    • <%= l(:mail_issue_content)%> + + <%= @news.description %> + +
    • + +
    +
    + +
    +
    + + + diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb index ef2be0f65..5ac95a571 100644 --- a/app/views/mailer/news_comment_added.html.erb +++ b/app/views/mailer/news_comment_added.html.erb @@ -1,5 +1,40 @@ -

    <%= link_to(h(@news.title), @news_url) %>

    -

    <%= l(:text_user_wrote, :value => h(@comment.author)) %>

    +

    + + <%= link_to(h("#{@comment.author.login}(#{@comment.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% 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 %> + <%= l(:mail_issue_title_active)%>

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • +
    • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
    • +
    • <%= l(:mail_issue_content)%> + + <%= @news.description %> + +
    • + +
    +
    + +
    +
    + + -<%= textilizable @comment, :comments, :only_path => false %> diff --git a/config/application.rb b/config/application.rb index 2f1534d00..311bf457b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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, From 38157e560eb1524f584e4f3b01199a7883b19551 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 23 Jan 2015 15:08:34 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E8=AF=BE=E7=A8=8B--=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93--=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90=EF=BC=9A?= =?UTF-8?q?=E5=BD=93=E5=8F=98=E5=8C=96=E5=B1=8F=E5=B9=95=E5=88=86=E8=BE=A8?= =?UTF-8?q?=E7=8E=87=E6=97=B6=EF=BC=8C=E2=80=9C=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E2=80=9D=E5=AD=97=E6=A0=B7=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8;=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E6=88=96?= =?UTF-8?q?=E7=BB=84=E6=B2=A1=E6=9C=89=E9=93=BE=E6=8E=A5;=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E8=AF=BE=E7=A8=8B=E4=B8=AD=EF=BC=8C=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=E6=88=90?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=A3=8E=E6=A0=BC;=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=EF=BC=8C=E7=AB=9E=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/views/courses/_course_form.html.erb | 6 +++--- app/views/courses/new.html.erb | 2 +- app/views/files/_attachement_list.html.erb | 2 +- app/views/files/_upload_show.html.erb | 10 +++++----- app/views/welcome/_search_course.html.erb | 2 +- app/views/welcome/_search_project.html.erb | 2 +- config/locales/en.yml | 6 +++++- config/locales/zh.yml | 6 +++++- 9 files changed, 23 insertions(+), 15 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7efa02503..caf29ba90 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -494,7 +494,7 @@ module ApplicationHelper def principals_check_box_tags_ex(name, principals) s = '' principals.each do |principal| - s << "\n" + s << "\n" end s.html_safe end diff --git a/app/views/courses/_course_form.html.erb b/app/views/courses/_course_form.html.erb index d293f9ed1..d54741295 100644 --- a/app/views/courses/_course_form.html.erb +++ b/app/views/courses/_course_form.html.erb @@ -29,7 +29,7 @@ <%= l(:label_tags_course_name) %> *   - +

    <%= f.fields_for @course do |m| %> @@ -38,7 +38,7 @@
    - + <%= l(:label_class_period) %> *   @@ -118,7 +118,7 @@

    - + <%= l(:text_command) %> <% end %> diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 77f041322..b9422ba64 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -6,7 +6,7 @@ <%= labelled_form_for @course do |f| %>
    <%= render :partial => 'course_form', :locals => { :f => f } %> - + <%= submit_tag l(:button_create), :class => "enterprise"%> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index f65ba8d41..85739f7c3 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -22,7 +22,7 @@
    - + <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index 13bcd043e..65a662f10 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -1,15 +1,15 @@
    -

    上传资源

    +

    <%= l(:label_upload_files)%>

    <%= error_messages_for 'attachment' %> - + <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %> - + <%= render :partial => 'attachement_list',:locals => {:course => course} %>
    - 确  认 - 取  消 + <%= l(:button_confirm)%> + <%= l(:button_cancel)%> <% end %>
    diff --git a/app/views/welcome/_search_course.html.erb b/app/views/welcome/_search_course.html.erb index c3bbd46d8..895f696fb 100644 --- a/app/views/welcome/_search_course.html.erb +++ b/app/views/welcome/_search_course.html.erb @@ -47,7 +47,7 @@ form #search_type{ <%#完了把上面东西放到 .css 里%> <%= form_tag({controller: :welcome, action: :search }, method: :get) do %> -
    diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 0ec585868..5145dbb2c 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -1,26 +1,29 @@

    + <%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> <%= l(:mail_issue_title_userin)%> <%= link_to(h("#{@issue.project.name}"), @project_url, :style=>'color:#1b55a7; font-weight:bold;') %><%= l(:mail_issue_title_active)%>

      -
    • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %>
    • -
    • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
    • -
    • <%= l(:mail_issue_content)%> +
    • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %>
    • +
    • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
    • +
    • <%= l(:mail_issue_content)%> + <% if @journal.nil? %> - <%= issue.description %> + <%= issue.description=='' ? l(:label_none) : issue.description %> <% else %> - <%= @journal.notes %> + <%= @journal.notes=='' ? l(:label_none) : @journal.notes %> <% end%>
    • -
    • - - <% unless @issue.attachments.nil? %> - <%= l(:mail_issue_attachments)%> +
    • + <%= l(:mail_issue_attachments)%> + <% if @issue.attachments.count == 0 %> + <%= l(:label_none)%> + <% else %> <% @issue.attachments.each do |attach| %>

      <%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false, :style=>'color:#1b55a7; font-weight:bold;')%>

      diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb index f7412402c..35b963b41 100644 --- a/app/views/mailer/issue_edit.html.erb +++ b/app/views/mailer/issue_edit.html.erb @@ -1,10 +1,6 @@ -
      - <%= l(:text_issue_updated, :id => "##{@issue.project_index}", :author => h(@journal.user)) %> - -
      -
      + <%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
      <%= link_to( l(:mail_issue_footer), @user_url, :style=>'font-size:12px; font-weight:normal; color:#1b55a7;') %>
      diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb index 5ac95a571..3e0118849 100644 --- a/app/views/mailer/news_comment_added.html.erb +++ b/app/views/mailer/news_comment_added.html.erb @@ -24,7 +24,7 @@
    • <%= l(:mail_issue_content)%> - <%= @news.description %> + <%= @comment.comments %>
    • From 36ec204f40d18584242b397ce6c55d652cf4c8a1 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 26 Jan 2015 16:54:46 +0800 Subject: [PATCH 24/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E8=B4=B4=E5=90=A7=E4=B8=AD=EF=BC=8C=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E5=B8=96=E5=AD=90=E5=90=8E=EF=BC=8C=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E8=AF=9D=E8=83=BD=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E3=80=8B=20Signed-off-by:=20alan=20<54753343?= =?UTF-8?q?4@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/edit.html.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 09e4262fe..008522316 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,5 +1,6 @@ <% @replying = !@memo.parent.nil? %> +

      <%=l(:label_memo_edit)%>

      <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <% if @memo.errors.any? %> @@ -19,8 +20,12 @@ <% end %>

      - <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%> -

      + <% 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 %> +

      <% if User.current.admin?%>

      <% unless @replying %> From 64cbeddd1370d97d427cb843d0e0392df821a26c Mon Sep 17 00:00:00 2001 From: whimlex Date: Mon, 26 Jan 2015 17:37:05 +0800 Subject: [PATCH 25/29] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E2=80=9C=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E2=80=9D=E4=BF=AE=E6=94=B9=E4=B8=BA=E2=80=9C=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=B7=9F=E8=B8=AA=E2=80=9D=EF=BC=8Csidebar=E6=A0=8F?= =?UTF-8?q?=E2=80=9C=E7=BC=BA=E9=99=B7=E2=80=9D=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E9=97=AE=E9=A2=98=E2=80=9D=EF=BC=9B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=96=B0=E9=97=BB=E6=8C=89=E9=92=AE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=BB=9F=E4=B8=80=EF=BC=9B=E6=96=B0=E5=BB=BA=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=A0=B7=E5=BC=8F=E7=BB=9F=E4=B8=80=EF=BC=9B=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E9=87=8D=E5=BC=80=E5=92=8C=E5=85=B3=E9=97=AD=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=EF=BC=9B=E7=AB=9E=E8=B5=9B=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E9=94=81=E5=AE=9A=EF=BC=9B=E7=BF=BB=E8=AF=91=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_form.html.erb | 2 +- app/views/courses/_set_course_time.html.erb | 4 +- app/views/layouts/base_newcontest.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 3 +- app/views/news/_project_news.html.erb | 4 +- config/locales/en.yml | 41 +++++++++++---------- config/locales/zh.yml | 13 +++++-- 7 files changed, 38 insertions(+), 31 deletions(-) diff --git a/app/views/courses/_course_form.html.erb b/app/views/courses/_course_form.html.erb index d54741295..85ca24c1b 100644 --- a/app/views/courses/_course_form.html.erb +++ b/app/views/courses/_course_form.html.erb @@ -42,7 +42,7 @@ <%= l(:label_class_period) %> *   - + <%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %>   diff --git a/app/views/courses/_set_course_time.html.erb b/app/views/courses/_set_course_time.html.erb index f1eec891f..0c28b90a7 100644 --- a/app/views/courses/_set_course_time.html.erb +++ b/app/views/courses/_set_course_time.html.erb @@ -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 %> <% end %> diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index 0d234a69c..d525f65a2 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -102,7 +102,7 @@ <% if User.current.login? %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 67e4da0f4..b8cc2ddc9 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -132,8 +132,9 @@ + diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 79217f1fe..526c7a1a5 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -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 %> - <%= 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 %>
      diff --git a/config/locales/en.yml b/config/locales/en.yml index 38f33de22..972fd99a1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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" @@ -250,9 +250,14 @@ en: 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 @@ -541,7 +546,7 @@ en: project_module_calendar: Calendar project_module_gantt: Gantt - #edit by meng + # edit by meng lable_hot_course: Hot projects lable_hot_projects: Active courses lable_user_active: User movements @@ -559,10 +564,10 @@ en: 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 - + label_submit: Submit + # create course and course info label_tags_course_name: Course Title label_new_course_password: Password label_new_course_description: Description @@ -572,39 +577,32 @@ en: 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 - + field_evaluation_num: Number of anonymous works sent to each student label_edit_homework: Update homework - label_homework_list: Work list - + 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 @@ -638,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 @@ -691,7 +689,10 @@ en: 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 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 115bc815b..d058a6c1b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -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,11 +263,16 @@ 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 @@ -591,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: 问题已添加 @@ -1034,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: "发布了通知:" From e5e24c116301631d8b4b7c43694fafb630a37003 Mon Sep 17 00:00:00 2001 From: whimlex Date: Mon, 26 Jan 2015 17:47:33 +0800 Subject: [PATCH 26/29] resolve conflict --- app/views/layouts/_base_feedback.html.erb | 1 - .../stylesheets/window_js/nuncio.css | 328 +++++++++--------- .../stylesheets/window_js/spread.css | 216 ++++++------ 3 files changed, 272 insertions(+), 273 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index f1c829c1f..bf4b12daf 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -135,7 +135,6 @@ function f_submit() - 意见反馈 diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css index e2700e5b7..2c439bd00 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/nuncio.css @@ -1,164 +1,164 @@ -.overlay_nuncio img { border: none; } - -.overlay_nuncio { - background-color: #666666; -} - -.nuncio_nw { - width: 12px; - height: 28px; - background: url(nuncio/top_left.png) no-repeat; -} - -.nuncio_n { - background: url(nuncio/top_mid.png) repeat-x; - height: 28px; -} - -.nuncio_ne { - width: 21px; - height: 28px; - background: url(nuncio/top_right.png) no-repeat; -} - -.nuncio_e { - width: 21px; - background: url(nuncio/center_right.png) repeat-y top right; -} - -.nuncio_w { - width: 12px; - background: url(nuncio/center_left.png) repeat-y top left; -} - -.nuncio_sw { - width: 12px; - height: 18px; - background: url(nuncio/bottom_left.png) no-repeat; -} - -.nuncio_s { - background: url(nuncio/bottom_mid.png) repeat-x 0 0; - height: 18px; -} - -.nuncio_se, .nuncio_sizer { - width: 21px; - height: 18px; - background: url(nuncio/bottom_right.png) no-repeat; -} - -.nuncio_close { - width: 14px; - height: 14px; - background: url(nuncio/close.png) no-repeat; - position:absolute; - top:10px; - right:22px; - cursor:pointer; - z-index:2000; -} - -.nuncio_minimize { - width: 14px; - height: 15px; - background: url(nuncio/minimize.png) no-repeat; - position:absolute; - top:10px; - right:40px; - cursor:pointer; - z-index:2000; -} - -.nuncio_title { - float:left; - font-size:11px; - font-weight: bold; - font-style: italic; - color: #fff; - width: 100% -} - -.nuncio_content { - background: url(nuncio/overlay.png) repeat; - overflow:auto; - color: #ddd; - font-family: Tahoma, Arial, "sans-serif"; - font-size: 10px; -} - -.nuncio_sizer { - cursor:se-resize; -} - - -.top_draggable, .bottom_draggable { - cursor:move -} -/* FOR IE */ -* html .nuncio_nw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); -} - -* html .nuncio_n { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); -} - -* html .nuncio_ne { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); -} - -* html .nuncio_w { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); -} - -* html .nuncio_e { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); -} - -* html .nuncio_sw { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); -} - -* html .nuncio_s { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); -} - -* html .nuncio_se { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); -} - -* html .nuncio_sizer { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); -} - -* html .nuncio_close { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); -} - -* html .nuncio_minimize { - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); -} - +.overlay_nuncio img { border: none; } + +.overlay_nuncio { + background-color: #666666; +} + +.nuncio_nw { + width: 12px; + height: 28px; + background: url(nuncio/top_left.png) no-repeat; +} + +.nuncio_n { + background: url(nuncio/top_mid.png) repeat-x; + height: 28px; +} + +.nuncio_ne { + width: 21px; + height: 28px; + background: url(nuncio/top_right.png) no-repeat; +} + +.nuncio_e { + width: 21px; + background: url(nuncio/center_right.png) repeat-y top right; +} + +.nuncio_w { + width: 12px; + background: url(nuncio/center_left.png) repeat-y top left; +} + +.nuncio_sw { + width: 12px; + height: 18px; + background: url(nuncio/bottom_left.png) no-repeat; +} + +.nuncio_s { + background: url(nuncio/bottom_mid.png) repeat-x 0 0; + height: 18px; +} + +.nuncio_se, .nuncio_sizer { + width: 21px; + height: 18px; + background: url(nuncio/bottom_right.png) no-repeat; +} + +.nuncio_close { + width: 14px; + height: 14px; + background: url(nuncio/close.png) no-repeat; + position:absolute; + top:10px; + right:22px; + cursor:pointer; + z-index:2000; +} + +.nuncio_minimize { + width: 14px; + height: 15px; + background: url(nuncio/minimize.png) no-repeat; + position:absolute; + top:10px; + right:40px; + cursor:pointer; + z-index:2000; +} + +.nuncio_title { + float:left; + font-size:11px; + font-weight: bold; + font-style: italic; + color: #fff; + width: 100% +} + +.nuncio_content { + background: url(nuncio/overlay.png) repeat; + overflow:auto; + color: #ddd; + font-family: Tahoma, Arial, "sans-serif"; + font-size: 10px; +} + +.nuncio_sizer { + cursor:se-resize; +} + + +.top_draggable, .bottom_draggable { + cursor:move +} +/* FOR IE */ +* html .nuncio_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); +} + +* html .nuncio_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); +} + +* html .nuncio_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); +} + +* html .nuncio_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); +} + +* html .nuncio_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); +} + +* html .nuncio_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); +} + +* html .nuncio_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); +} + +* html .nuncio_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); +} + +* html .nuncio_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); +} + diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css index d7d722e8a..9bda2a68d 100644 --- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css +++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/spread.css @@ -1,108 +1,108 @@ -.overlay_spread { - background-color: #85BBEF; - filter:alpha(opacity=60); - -moz-opacity: 0.6; - opacity: 0.6; -} - -.spread_nw { - background: transparent url(spread/left-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.spread_n { - background: transparent url(spread/top-middle.gif) repeat-x 0 0; - height:25px; -} - -.spread_ne { - background: transparent url(spread/right-top.gif) no-repeat 0 0; - width:10px; - height:25px; -} - -.spread_w { - background: transparent url(spread/frame-left.gif) repeat-y top left; - width:7px; -} - -.spread_e { - background: transparent url(spread/frame-right.gif) repeat-y top right; - width:7px; -} - -.spread_sw { - background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.spread_s { - background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; - height:7px; -} - -.spread_se, .spread_sizer { - background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; - width:7px; - height:7px; -} - -.spread_sizer { - cursor:se-resize; -} - -.spread_close { - width: 23px; - height: 23px; - background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:11px; - cursor:pointer; - z-index:1000; -} - -.spread_minimize { - width: 23px; - height: 23px; - background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:55px; - cursor:pointer; - z-index:1000; -} - -.spread_maximize { - width: 23px; - height: 23px; - background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; - position:absolute; - top:0px; - right:33px; - cursor:pointer; - z-index:1000; -} - -.spread_title { - float:left; - height:14px; - font-family: Tahoma, Arial, sans-serif; - font-size:14px; - font-weight:bold; - text-align:left; - margin-top:2px; - width:100%; - color:#E47211; -} - -.spread_content { - overflow:auto; - color: #222; - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; - background:#A9EA00; -} - +.overlay_spread { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.spread_nw { + background: transparent url(spread/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_n { + background: transparent url(spread/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.spread_ne { + background: transparent url(spread/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_w { + background: transparent url(spread/frame-left.gif) repeat-y top left; + width:7px; +} + +.spread_e { + background: transparent url(spread/frame-right.gif) repeat-y top right; + width:7px; +} + +.spread_sw { + background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_s { + background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.spread_se, .spread_sizer { + background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_sizer { + cursor:se-resize; +} + +.spread_close { + width: 23px; + height: 23px; + background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.spread_minimize { + width: 23px; + height: 23px; + background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.spread_maximize { + width: 23px; + height: 23px; + background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.spread_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:14px; + font-weight:bold; + text-align:left; + margin-top:2px; + width:100%; + color:#E47211; +} + +.spread_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background:#A9EA00; +} + From 97c7ccac1627286f489c43cab4ca428d7d5a5dbf Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 27 Jan 2015 09:45:15 +0800 Subject: [PATCH 27/29] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 14 +++++- app/views/poll/_poll.html.erb | 69 ++++++++++++++++++++---------- app/views/poll/close_poll.js.erb | 2 + app/views/poll/index.html.erb | 24 +++++++++++ config/routes.rb | 1 + public/stylesheets/polls.css | 4 +- 6 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 app/views/poll/close_poll.js.erb diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 8926c0be6..d49694e6f 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -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 @@ -339,6 +339,16 @@ class PollController < ApplicationController end end + #关闭问卷 + def close_poll + @poll.polls_status = 3 + if @poll.save + respond_to do |format| + format.js + end + end + end + private def find_poll_and_course @poll = Poll.find params[:id] diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index 1bf6b3716..fdf534405 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -22,7 +22,7 @@ <% end %> <%if @is_teacher%> - <% if poll.polls_status == 1 %> + <% if poll.polls_status == 1 || poll.polls_status == 3 %>
    • 统计结果
    • <% elsif poll.polls_status == 2%>
    • @@ -31,38 +31,61 @@ <% end%> <% end%> -
    • - <%if @is_teacher %> + +<%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 +
    • + + 发布问卷 + +
    • <% elsif poll.polls_status == 2%> - 取消发布 +
    • + + 取消发布 + +
    • + <% else%> +
    • + 发布问卷 +
    • <% end%> - <% end%> - +<% end%> +
    • <% 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%>
    • -
    • - <% 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%> -
    • 编辑
    • - <% end%> + +<% if @is_teacher%> + <% if poll.polls_status == 1 %> +
    • + <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml15"%> +
    • + <% else%> +
    • + 编辑 +
    • <% end%> - - - - - - - - +<% end%> + +<% if @is_teacher%> + <% if poll.polls_status == 2 %> +
    • + 关闭 +
    • + <% else %> +
    • + 关闭 +
    • + <% end%> + +<% end %> + +
    • <%= format_time poll.created_at%>
    • \ No newline at end of file diff --git a/app/views/poll/close_poll.js.erb b/app/views/poll/close_poll.js.erb new file mode 100644 index 000000000..222ea7976 --- /dev/null +++ b/app/views/poll/close_poll.js.erb @@ -0,0 +1,2 @@ +$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); +alert("关闭成功"); \ No newline at end of file diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index 29a5ec51f..3db4d7caa 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -56,6 +56,30 @@ $('#ajax-modal').parent().addClass("popbox_polls"); } } + + function close_poll(poll_id) + { + $('#ajax-modal').html("
      " + + "
      " + + "
      " + + "

      问卷关闭后学生将不能继续提交问卷,
      是否确定关闭该问卷?

      " + + "
      " + + "确  定" + + "取  消" + + "
      " + + "
      " + + "
      " + + "
      " + + "
      "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','120px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + }
      diff --git a/config/routes.rb b/config/routes.rb index 65498e4ec..29dab3ccc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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' diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 370a3c515..f0d670a1d 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -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;} @@ -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;} From fe06ca503a976c22aff31db041b480d72bcc16e9 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 27 Jan 2015 09:55:02 +0800 Subject: [PATCH 28/29] =?UTF-8?q?=E5=A2=9E=E5=8A=A0poll=20colsed=5Fat?= =?UTF-8?q?=E7=9A=84=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index d49694e6f..394c52f13 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -342,6 +342,7 @@ class PollController < ApplicationController #关闭问卷 def close_poll @poll.polls_status = 3 + @poll.closed_at = Time.now if @poll.save respond_to do |format| format.js From 649c65fbe222202c253de61cf4a4fc7bbecb2bb1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 27 Jan 2015 10:14:05 +0800 Subject: [PATCH 29/29] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/poll_helper.rb | 8 ++++---- app/views/poll/_edit_MC.html.erb | 8 ++++++-- app/views/poll/_edit_MCQ.html.erb | 8 ++++++-- app/views/poll/_edit_head.html.erb | 8 ++++++-- app/views/poll/_edit_mulit.html.erb | 8 ++++++-- app/views/poll/_edit_single.html.erb | 8 ++++++-- app/views/poll/_new_MC.html.erb | 8 ++++++-- app/views/poll/_new_MCQ.html.erb | 8 ++++++-- app/views/poll/_new_mulit.html.erb | 8 ++++++-- app/views/poll/_new_single.html.erb | 8 ++++++-- 10 files changed, 58 insertions(+), 22 deletions(-) diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb index 60d82c096..3156f1b3a 100644 --- a/app/helpers/poll_helper.rb +++ b/app/helpers/poll_helper.rb @@ -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 diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index 066eafe0d..f89407247 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -39,8 +39,12 @@
      diff --git a/app/views/poll/_edit_MCQ.html.erb b/app/views/poll/_edit_MCQ.html.erb index 129f50e94..d6045f965 100644 --- a/app/views/poll/_edit_MCQ.html.erb +++ b/app/views/poll/_edit_MCQ.html.erb @@ -36,8 +36,12 @@
      diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index ed90a5ef8..dfa5b5cfc 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -7,8 +7,12 @@
      diff --git a/app/views/poll/_edit_mulit.html.erb b/app/views/poll/_edit_mulit.html.erb index d498169f4..5c694ff05 100644 --- a/app/views/poll/_edit_mulit.html.erb +++ b/app/views/poll/_edit_mulit.html.erb @@ -20,8 +20,12 @@
      diff --git a/app/views/poll/_edit_single.html.erb b/app/views/poll/_edit_single.html.erb index 2c2d41e0f..5aff29984 100644 --- a/app/views/poll/_edit_single.html.erb +++ b/app/views/poll/_edit_single.html.erb @@ -16,8 +16,12 @@
      diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb index a7f9e441b..294c058f8 100644 --- a/app/views/poll/_new_MC.html.erb +++ b/app/views/poll/_new_MC.html.erb @@ -34,8 +34,12 @@
      diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index 027a1c1f6..1478f9918 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -33,8 +33,12 @@
      diff --git a/app/views/poll/_new_mulit.html.erb b/app/views/poll/_new_mulit.html.erb index 02f7a71a7..23ffb3d64 100644 --- a/app/views/poll/_new_mulit.html.erb +++ b/app/views/poll/_new_mulit.html.erb @@ -13,8 +13,12 @@
      diff --git a/app/views/poll/_new_single.html.erb b/app/views/poll/_new_single.html.erb index ffc525546..4ee185070 100644 --- a/app/views/poll/_new_single.html.erb +++ b/app/views/poll/_new_single.html.erb @@ -8,8 +8,12 @@
      - <%= link_to @contest.name, show_contest_contest_path(@contest) %> + <%= link_to @contest.name, contest_contestnotifications_path(@contest) %>
      <%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %> - <%=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) %>