修改小bug;设计打分和评论唯一性前提交版

This commit is contained in:
wanglinchun 2014-04-14 21:54:54 +08:00
parent f2ed529b92
commit b4b61a3422
10 changed files with 53 additions and 69 deletions

View File

@ -1,6 +1,5 @@
<div class="attachments">
<% for attachment in attachments %>
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<!-- #wang -->
<% for attachment in attachments %><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments', :action => 'show',
@ -9,4 +8,3 @@
<%= h(" - #{attachment.description}") unless attachment.description.blank? %>
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
<% end -%>
</div>

View File

@ -68,7 +68,7 @@
<td>
<p>
<div class="font_lighter" style="font-size: 13px;">
<%= link_to '创建应用', new_softapplication_path(:target=>'_blank') %> <!--跳转到softapplication的new.html.erb-->
<%= link_to '发布应用', new_softapplication_path(:target=>'_blank') %> <!--跳转到softapplication的new.html.erb-->
</div>
</p>
</td>

View File

@ -173,44 +173,10 @@
</div>
<!-- 参赛项目 -->
<div class="user_fans">
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_contest_project) %></strong>
<% if show_more_contest_project?(@contest) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_project'%></span>
<% end %>
</div>
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px">
<%= show_contest_project(@contest) %>
</td>
</tr>
</table>
</div>
</div>
<!-- 参赛应用-->
<div class="user_fans">
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_contest_application) %></strong>
<% if show_more_contest_softapplication?(@contest) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_softapplication'%></span>
<% end %>
</div>
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px">
<%= show_contest_softapplication(@contest) %>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
<% if @course_tag == '1' %>
<h3><%=l(:label_course_new)%></h3>
<div class="box tabular">
<p style="font-weight: bold; color: rgb(237,137,36)"><%=raw l(:label_course_news_description)%></p>
<%= render :partial => 'course_form', :locals => { :f => f } %>
<span style="padding-left: 60px"><%= submit_tag l(:button_create), :class => "enterprise"%></span>
<!-- <%= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->

View File

@ -37,10 +37,10 @@
<%= f.text_field :reference_user_id, :style=>"display:none"%> <!--what function?-->
<!-- modified by bai -->
<table border="0" width="525px" align="center">
<table border="0" width="518px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
<%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
<td align="right"> <%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
<%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
</tr>
</table>
<!-- end -->

View File

@ -3,32 +3,32 @@
<%= link_to 'Back', softapplications_path %> -->
<div id="put-bid-form">
<div >
<%= form_for Softapplication.new, :url => {:controller => 'softapplications', :action => 'create'}, :update => "bidding_project_list", :complete => '$("#put-bid-form").hide();', :html => {:multipart => true, :id => 'add_homework_form'} do |f| %>
<fieldset>
<legend>
<fieldset class="contes-new-box">
<!-- <legend>
<%= l(:label_attachment_plural) %>
</legend>
</legend> -->
<tr style="width:700px; margin-left: -10px">
<td><%= l(:label_softapplication_name) %></td>
<td style="require, color: #bb0000"> * </td>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
<td><%= l(:label_softapplication_name_condition)%></td>
<span><%= l(:label_softapplication_name) %></span>
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
<span><%= l(:label_softapplication_name_condition)%></span>
</tr></ br>
<br />
<br />
<tr style="width:800px;">
<td><%= l(:label_softapplication_version_available) %></td>
<td style="require, color: #bb0000"> * </td>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
<span><%= l(:label_softapplication_version_available) %></span>
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
</tr></ br>
<br />
<br />
<tr style="width:800px;">
<td><%= l(:label_softapplication_type) %></td>
<span><%= l(:label_softapplication_type) %></span>
<td style="require, color: #bb0000"> * </td>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
<span class="contest-star"> * </td>: <td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
</tr></ br>
<br />

View File

@ -10,27 +10,27 @@
<p id="notice"><%= notice %></p>
<!-- <%= image_tag(url_to_avatar(@user), :class => "avatar2") %> -->
<div style="height: 135px">
<div style="height: 130px">
<tr>
<td colspan="2" valign="top" width="50" >
<td colspan="2" valign="top" width="320" >
</td>
<td>
<table width="100%" border="0">
<tr style="font-size: 18px">
<td colspan="3" valign="top"><strong><%= @softapplication.name %></strong></td>
<td colspan="2" valign="top"><strong><%= @softapplication.name %></strong></td>
</tr>
<tr>
<td>所属类别:<%= @softapplication.app_type_name %></td>
<td>发布时间:<%=format_time @softapplication.created_at %></span></td>
<td>发布时间:<%=format_time @softapplication.created_at %></td>
</tr>
<tr>
<td>发布人员:<%= @softapplication.user.name %></td>
<td>系统支持:<%= @softapplication.android_min_version_available %></td>
</tr>
<tr>
<td>应用下载:
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current) } %>
<%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
<td><span>应用下载:</span>
<span><% options = {:author => true, :deletable => @softapplication.user.eql?(User.current) } %>
<%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %></span>
</td>
<td>开发人员:<%= @softapplication.application_developers %></td>
</tr>
@ -41,14 +41,14 @@
</div>
<div class="underline-contests_one"></div>
<div style="height: 100px">
<div style="font-size: 15px">应用简介:</div>
<div style="height: 60px">
<strong><div style="font-size: 15px">应用简介:</div></strong>
<div><%= @softapplication.description %></div>
</div>
<div class="underline-contests_one"></div>
<div style="height: 240px">
<div style="font-size: 15px">软件截图:</div>
<strong><div style="font-size: 15px">软件截图:</div></strong>
<div class="softapplication-img">
<% @image_results.take(4).each do |attachment| %>
<%= link_to_attachment_img attachment, :class => "soft-application", :download => "true" %>
@ -60,7 +60,7 @@
<div class="underline-contests_one"></div>
<div style="height: 120px">
<div style="font-size: 15px">软件评论:</div>
<strong><div style="font-size: 15px">软件评论:</div></strong>
<div></div>
</div>

View File

@ -101,7 +101,7 @@
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_contest_description) %></span>
</div>
<!--网站状态-->
<div style="width: 20%; height: 60px; border: 1px solid black; float:right;">
<div class="contest_count">
<tr>
<td>竞赛总量:</td>
<td></td>

View File

@ -1843,4 +1843,5 @@ zh:
label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。
label_contest_description_no: 暂无描述。
label_no_contest_softapplication: 暂无参赛应用
label_button_ok: 确定

View File

@ -9,6 +9,14 @@ h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
/*huang*/
/*current position*/
.contest_count{
width: 20%;
height: 60px;
border: 1px solid #15bccf;
border-radius: 5px 5px 5px 5px;
float:right;
}
.top-content{
background-color: #f7f7f7;
height: 56px;
@ -2712,4 +2720,15 @@ div.repos_explain{
margin-bottom: 10px;
border-bottom: 1px dashed rgb(204, 204, 204);
width: 660px;
}
}
.contest-star{
color: #bb0000;
}
.contes-new-box{
background: #fcfcfc;
padding-left: 85px;
padding-top: 20px;
padding-bottom: 20px;
}