From 4182bb5fe712221457aa8372330e1d73acb92e32 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 20 Apr 2016 14:39:38 +0800 Subject: [PATCH 01/33] 111 --- app/controllers/admin_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e581216fe..906194951 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -603,7 +603,7 @@ class AdminController < ApplicationController @code_work_tests[tCount-1] = {} @code_work_tests = paginateHelper @code_work_tests,30 - @page = (params['page'] || 1).to_i - 1 + @page = (params['page'] || 1).to_i - 1 #1111111111 #取出需要的那一页数据 tStart = @page*30 From 29115bca3ae1fd2d81303e523b56584ab8cd9c23 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 20 Apr 2016 16:12:20 +0800 Subject: [PATCH 02/33] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 7 +- app/controllers/blogs_controller.rb | 7 + app/views/blogs/_article.html.erb | 258 ++++------------------- app/views/blogs/_article_list.html.erb | 37 +--- app/views/blogs/index.html.erb | 2 +- app/views/layouts/new_base_user.html.erb | 2 +- public/images/liststyle.png | Bin 0 -> 19559 bytes public/stylesheets/new_user.css | 35 +++ 8 files changed, 88 insertions(+), 260 deletions(-) create mode 100644 public/images/liststyle.png diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 906194951..e6e0ec087 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -600,10 +600,11 @@ class AdminController < ApplicationController #设置个空的数组 以便paginateHelper来分页 @code_work_tests = [] - @code_work_tests[tCount-1] = {} - + if tCount >= 1 + @code_work_tests[tCount-1] = {} + end @code_work_tests = paginateHelper @code_work_tests,30 - @page = (params['page'] || 1).to_i - 1 #1111111111 + @page = (params['page'] || 1).to_i - 1 #取出需要的那一页数据 tStart = @page*30 diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb index 7a226f50d..8ee153456 100644 --- a/app/controllers/blogs_controller.rb +++ b/app/controllers/blogs_controller.rb @@ -3,6 +3,13 @@ class BlogsController < ApplicationController before_filter :find_user def index @article = BlogComment.new + + @topics = @user.blog.articles.reorder("#{BlogComment.table_name}.sticky desc,#{BlogComment.table_name}.updated_on desc") + + #分页 + @topics = paginateHelper @topics,10 + @page = (params['page'] || 1).to_i - 1 + respond_to do |format| format.html {render :layout=>'new_base_user'} end diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index edbce26d3..cfc43ca47 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -1,226 +1,46 @@ -
+ <%= count>0 ? "(#{count})" : "" %> + 回复 + | + <%= get_praise_num(activity) > 0 ? "(#{get_praise_num(activity)})" : "" %> + 赞 +
+<%= homework_num %>作业| <%= visable_attachemnts_incourse(course).count %>资源
+2016年3月27日上午,湖南省经信委巡视员钟志慧,湖南省发改委副主任卓群、高技处处长何志明、就业处处长周建龙等领导代表在长沙中电软件园董事长何明、总经理夏利锋的陪同来北斗开放实验室长沙分实验室调研参观。北斗开放实验室办公室主任明德祥为参观的各位领导详细介绍了北斗开放实验室运行机制及各项共享资源。北斗开放实验室长沙分实验室是由导航仪器湖南省工程研究中心、湖南矩阵电子科技有限公司及中国仪器仪表学会空间仪器分会共同建设。为进一步推动北斗资源共享、创新北斗人才培养......
+卫星导航仿真与测试开放实验室
扫一扫 关注我!
cT$VO5v$6~GHnc+-tD
z# m!_F(==$}yPi7dG!)G{<|DT=Ge
z1!|+6B_@;?B5aKHqOh=?!X0w9ArqL8O@^5JUC$X3EYv;T!v_Ce5K>K1M<2f)H}$O&
z9*L*NxiRJsxq$>hzVKJU(Lx6Fhah3@8qb= yy
zZ8jU#eXFATgfxeQOiq{VuFzj5kv>k!Iy3hKrMas7Wf;LSdq&auc>oIXY#S`MXBF`d
z=+dfv2WUPvY5#redx@NitLJNblvdRIodCBK%rQI_luO*MnI7$Y@540|U2PL6Z5zp<
zwU{$-nYjHNOBk;}UFLf;qZ+_<;Qqwj$AR$<$eZ#T9?0LSCySB5lE*8;Kt$g=t~v>w
zYc&eo2c6~KnSrA`wL`x%nA&>;Id17Uih~_l@MSLxt+C4dwVp5lm0J7XY= x^EioCQUu+k
z6=f4CWA$OT0!@@>tBrfLGw*=i1HOB7={RNgWxx2RngJF1itS`!`9B$)V4MKOHXuyX
zm%RCNjy{hPwpF2t5SULnL|5tRiiOeH9x%5Chm2SoRc<@are&<{`s1Zf3XN}3a({NV
z^RGa;$@}A`I72iyXW`h@{*8um6te-?hquRd^J6Skr>{cBcf5`(2E{1%-vekXCE5FO
z*L$0%Rf<}O
eQZFa(KIB+
zHLA=tkh7emEPnQ7<)GX|_bqB}$5z!AGO$Kh%B0j{HhYilO#o~0FIaH6HRAkzinRoG
zUR;CS*u8mMQeBg8I7X^fP{bujd8MNLDcQrQ@%c)Lb!i!C?PsS5IQ=oyM7dK2x7hLe
z5SP3$fM(?mKIx#0XtkZK*zI`??Bum*cY)yJ;u%bwCQ|c_Agbb}?Q<2V?6d7`Xr4U#
zsn>?5%J|xOSqD&{t9P)_SWNF~FjvLFtYsc7Wda#qioX+Dfojd$%k*seVD?s-u7lk2
zH8E