修改contest中contestnotification列表和通知公告的界面

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-10-21 23:23:07 +08:00
parent 38345c0c68
commit 859a1122b7
10 changed files with 488 additions and 533 deletions

View File

@ -125,7 +125,6 @@ GEM
mocha (1.1.0) mocha (1.1.0)
metaclass (~> 0.0.1) metaclass (~> 0.0.1)
multi_json (1.10.1) multi_json (1.10.1)
mysql2 (0.3.11)
mysql2 (0.3.11-x86-mingw32) mysql2 (0.3.11-x86-mingw32)
net-ldap (0.3.1) net-ldap (0.3.1)
nokogiri (1.6.3) nokogiri (1.6.3)

View File

@ -1,28 +0,0 @@
<div class="top-content">
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf" ><%= l(:label_contest_innovate ) %></td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
<td rowspan="2">
</td>
<td rowspan="2" >
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<a href="http://contest.trustie.net/">contest.trustie.net</a>
</td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_innovate), welcome_contest_path %> > l(:label_details)</td>
</tr>
</table>
</div>
<!-- end -->
<div class="notification-content">
<p class="title"><%= @notification.title %></p>
<hr />
<p class="content"><%= @notification.content.html_safe %></p>
<hr />
</div>

View File

@ -21,11 +21,42 @@
</div> </div>
<% end %> <% end %>
<div> <div>
<% if @contestnotificationss.empty? %>
<p class="nodata"> <div style="margin-left: 20px;">
<%= l(:label_no_data) %> <span class="portrait">
<%= image_tag(url_to_avatar(@contest.author), :class => "avatar")%>
</span>
<span class="body">
<h3>
<%= link_to(@contest.author.lastname+@contest.author.firstname,
user_path(@contest.author))
%>
<%= @contest.name %></h3>
<p>
<strong>
<%= l(:label_bids_reward_method) %>
<span class="bonus">
<%= @contest.budget%>
</span>
</strong>
</p> </p>
<% else %> <div class="bid_description" style="width: 100%;word-break:break-all;word-wrap: break-word;">
<%= @contest.description %>
</div>
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",
:locals => {:obj => @contest,
:show_flag => true,
:user_id =>User.current.id,
:horizontal => false}
%>
</span>
</span>
</div>
<div style="clear: both;"></div>
<br><br>
<% @contestnotificationss.each do |contestnotifications| %> <% @contestnotificationss.each do |contestnotifications| %>
<table class="content-text-list"> <table class="content-text-list">
<tr> <tr>
@ -57,7 +88,7 @@
</tr> </tr>
</table> </table>
<% end %> <% end %>
<% end %>
</div> </div>
<!--end--> <!--end-->
<div style="padding-right: 10px"> <div style="padding-right: 10px">

View File

@ -1,37 +1,5 @@
<% reply_allow = JournalsForMessage.create_by_user? User.current %> <% reply_allow = JournalsForMessage.create_by_user? User.current %>
<div style="margin-left: 20px;">
<span class="portrait">
<%= image_tag(url_to_avatar(@contest.author), :class => "avatar")%>
</span>
<span class="body">
<h3>
<%= link_to(@contest.author.lastname+@contest.author.firstname,
user_path(@contest.author))
%>
<%= @contest.name %></h3>
<p>
<strong>
<%= l(:label_bids_reward_method) %>
<span class="bonus">
<%= @contest.budget%>
</span>
</strong>
</p>
<div class="bid_description" style="width: 100%;word-break:break-all;word-wrap: break-word;">
<%= @contest.description %>
</div>
<span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread",
:locals => {:obj => @contest,
:show_flag => true,
:user_id =>User.current.id,
:horizontal => false}
%>
</span>
</span>
</div>
<div style="clear: both;"></div>
<div id="history"> <div id="history">
<%= render :partial => 'history', <%= render :partial => 'history',

View File

@ -112,7 +112,7 @@
<tr> <tr>
<td><%= l(:lable_contest_user) %><%= link_to(@user.name, user_path(@user))%></td> <td><%= l(:lable_contest_user) %><%= link_to(@user.name, user_path(@user))%></td>
</tr> </tr>
<!-- end -->
<tr> <tr>
<td><%= l(:label_bids_reward_method) %><%= @bid.budget%></td> <td><%= l(:label_bids_reward_method) %><%= @bid.budget%></td>
</tr> </tr>

View File

@ -136,28 +136,6 @@
<div class="user_underline"></div> <div class="user_underline"></div>
</div> </div>
<div class="inf_user_image">
<table>
<tr>
<td>
<%= l(:lable_contest_user) %>:&nbsp;
<%= link_to(@user.name, user_path(@user))%>
</td>
</tr>
<tr>
<td>
<%= l(:label_bids_reward_method) %>
<%= @contest.budget%>
</td>
</tr>
<tr>
<td>
<%= l(:label_limit_time) %> :
<%= @contest.deadline%>
</td>
</tr>
</table>
</div>
<div class="user_underline"></div> <div class="user_underline"></div>
<div class="inf_user_context"> <div class="inf_user_context">

View File

@ -1,28 +1,35 @@
<% @softapplications.each do |softapplication| %> <% @softapplications.each do |softapplication| %>
<div> <div style="float: left; width:928px">
<span style="font-size: 15px; margin-right: 10px;"><strong><%= link_to softapplication.name, softapplication, :target => "_blank" %></strong></span> <span style="font-size: 15px; margin-right: 10px;"><strong><%= link_to softapplication.name, softapplication, :target => "_blank" %></strong></span>
<span><%= rating_for softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></span> <span><%= rating_for softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></span>
</div> </div>
<div class="avatar-4" style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div> <div class="avatar-4" style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div>
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div> <div style="float: left; width: 600px; margin-left: 8px">
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em "> <br/>
<%contest = softapplication.contests.first%> <%contest = softapplication.contests.first%>
<%=l(:label_attendingcontestwork_belongs_contest)%><%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%>
</br></br>
<%= l(:label_profile) %><%= softapplication.description.truncate(95, omission: '...') %>
</div>
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
<% strTitle = softapplication.android_min_version_available %>
<p><%=l(:label_attendingcontestwork_adaptive_system)%><lable title="<%= strTitle %>"><%= strTitle ? strTitle.truncate(10,omisiion:'...') : "" %></lable></p>
<p><%=l(:label_attendingcontestwork_belongs_contest)%><%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
<!--modified by longjun 因为新建竞赛作品时没有填写运行平台和类别所有如果为空不能使用truncate函数--> <!--modified by longjun 因为新建竞赛作品时没有填写运行平台和类别所有如果为空不能使用truncate函数-->
<p><%=l(:label_attendingcontestwork_belongs_type)%><%= softapplication.app_type_name ? softapplication.app_type_name.truncate(14, omission: '...') : "" %></p> <p><%=l(:label_attendingcontestwork_belongs_type)%><%= softapplication.app_type_name ? softapplication.app_type_name.truncate(14, omission: '...') : "" %></p>
<% strTitle = softapplication.android_min_version_available %>
<p><%=l(:label_attendingcontestwork_adaptive_system)%><lable title="<%= strTitle %>"><%= strTitle ? strTitle.truncate(10,omisiion:'...') : "" %></lable></p>
</div> </div>
<div style="padding-left: 53px"> <div style="padding-left: 53px; float: left; width: 928px;">
<span><%=l(:label_attendingcontestwork_developers)%><%= softapplication.application_developers %></span> <span><%=l(:label_attendingcontestwork_developers)%><%= softapplication.application_developers %></span>
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%><%=format_time softapplication.created_at %></span> <span style="float: right;margin-right: 93px;"><%=l(:label_attendingcontestwork_release_time)%><%=format_time softapplication.created_at %></span>
</div> </div>
<div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%"></div> <div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%; float: left"></div>
<div class="underline-contests_one" style="margin-top: -7px"></div> <div class="underline-contests_one" style="margin-top: -7px;float: left"></div>
<% end %> <% end %>
<div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div> <div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div>