#1297修复学生能看到发布通知按钮的BUG
2.增加课程是否对学生开发的数据迁移 3.页面代码整理 解决方案:增加当前登录用户是否在课程有发布通知权限的判断
This commit is contained in:
parent
f6561395a4
commit
b6551f8955
|
@ -62,8 +62,14 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %></td>
|
||||
<!-- modified by bai --> <td><%=link_to "主页", home_path %> > <%=link_to "软件创客", :controller => 'users', :action => 'index' %> > <span><%=link_to @user.name, user_path %></span></td>
|
||||
<td style="padding-left: 8px">
|
||||
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
|
||||
</td>
|
||||
<td>
|
||||
<%=link_to "主页", home_path %> >
|
||||
<%=link_to "软件创客", :controller => 'users', :action => 'index' %> >
|
||||
<span><%=link_to @user.name, user_path %></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -92,7 +98,8 @@
|
|||
<% end %></td>
|
||||
</tr>
|
||||
|
||||
<tr><td class="score">
|
||||
<tr>
|
||||
<td class="score">
|
||||
<div id="score_div">
|
||||
<%= render :partial => 'users/user_score', :locals => {:user => @user}%>
|
||||
</div>
|
||||
|
@ -104,12 +111,13 @@
|
|||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<strong class="font_small_watch"><%= link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%></strong>
|
||||
<strong class="font_small_watch">
|
||||
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%>
|
||||
</strong>
|
||||
|
||||
<strong class="font_small_watch"><%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users.count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
|
||||
|
||||
<!-- <strong class="font_small_watch"><%= link_to l(:label_requirement_focus)+"("+Bid.watched_by(@user).where('reward_type = ?', 1).count.to_s+")" ,:controller=>"users", :action=>"watch_bids"%></strong>--> <!-- added by huang -->
|
||||
<!-- added by bai 个人签名-->
|
||||
<strong class="font_small_watch">
|
||||
<%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users.count.to_s+")", :controller=>"users", :action=>"user_fanslist" %>
|
||||
</strong>
|
||||
<% if @user.id == User.current.id %>
|
||||
<p>
|
||||
<%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_user_introduction'} %>
|
||||
|
@ -125,17 +133,21 @@
|
|||
:url => {:controller => 'words', :action => 'add_brief_introdution'}) do |f|%>
|
||||
<table border="0" width="100%" align="center" >
|
||||
<tr>
|
||||
<td><%= f.text_area 'user_introduction', :rows => 3,
|
||||
<td>
|
||||
<%= f.text_area 'user_introduction', :rows => 3,
|
||||
:cols => 65,
|
||||
:placeholder => "#{l(:label_my_brief_introduction)}",
|
||||
:style => "resize: none;",
|
||||
:class => 'noline'%></td>
|
||||
:class => 'noline'%>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" width="200px" align="center">
|
||||
<tr>
|
||||
<td align="right"> <%= submit_tag l(:button_submit), :name => nil ,
|
||||
:class => "bid_btn" %></td>
|
||||
<td align="right">
|
||||
<%= submit_tag l(:button_submit), :name => nil ,
|
||||
:class => "bid_btn" %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
@ -148,20 +160,21 @@
|
|||
<div class="inf_user_context">
|
||||
<table style="font-family:'微软雅黑'" width="240">
|
||||
<tr>
|
||||
<td style="padding-left: 5px" width="70px"><%= l(:label_user_joinin) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= format_time(@user.created_on) %></td>
|
||||
<td style="padding-left: 5px" width="70px">
|
||||
<%= l(:label_user_joinin) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= format_time(@user.created_on) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 5px"><%= l(:label_user_login) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px"><%= format_time(@user.last_login_on) %></td>
|
||||
<td style="padding-left: 5px">
|
||||
<%= l(:label_user_login) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px">
|
||||
<%= format_time(@user.last_login_on) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 5px;"><%#= l(:label_user_mail) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px; word-wrap: break-word; word-break: break-all"><%#= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td>
|
||||
</tr>
|
||||
-->
|
||||
<!-- added by bai 在个人主页里显示“工作单位”“地区”"教师的职称"-->
|
||||
<!-- modified by linchun 在个人主页里显示“加入时间”,“最后登录”,“邮件地址”后面添加冒号-->
|
||||
<!-- modified by zjc 高校添加超链接 -->
|
||||
<% unless @user.user_extensions.nil? %>
|
||||
<% unless @user.user_extensions.identity == 2 %>
|
||||
<tr>
|
||||
|
@ -178,12 +191,21 @@
|
|||
<tr>
|
||||
<% if @user.user_extensions.identity == 0 %>
|
||||
<td style="padding-left: 5px" width="76px">
|
||||
<%= l(:label_technical_title) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.technical_title %></td>
|
||||
<%= l(:label_technical_title) %>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.technical_title %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% if( (@user.user_extensions.identity == 1) && (is_watching?(@user) ) )%>
|
||||
<tr>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:label_bidding_user_studentcode)%>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.student_id %></td>
|
||||
<td style="padding-left: 8px" width="70px">
|
||||
<%= l(:label_bidding_user_studentcode)%>:
|
||||
</td>
|
||||
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
|
||||
<%= @user.user_extensions.student_id %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else%>
|
||||
|
@ -196,7 +218,6 @@
|
|||
<% end %>
|
||||
<!-- end -->
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<!--Modified by nie-->
|
||||
<div class="user_underline"></div>
|
||||
|
|
|
@ -64,12 +64,12 @@
|
|||
<span style="font-size: 16px; border-bottom:1px solid #f0f0f0; margin-right: 15px;">
|
||||
<%= label_tips %>
|
||||
</span>
|
||||
<%= link_to(btn_tips,
|
||||
new_course_news_path(@course),
|
||||
|
||||
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||||
<%= link_to(btn_tips, new_course_news_path(@course),
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
|
||||
|
||||
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
|
||||
<div id="add-news" class="add_frame" style="display:none;">
|
||||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddOpenStudentToCourse < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :courses, :open_student, :integer, :default => 0
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue