修改competition的view文件,将其中不规范的代码进行修改,并将其中所有的link_to

修改成"link_to ‘welcome’ home_path,  {option}" 的形式;
统一route风格
match 'path', :to => 'controller#action'
如果 path = controller#action 则 match 'path'
Example:
match 'welcome/course', :to => 'welcome#course' 变成 match 'welcome/cource'


Signed-off-by: alan <547533434@qq.com>
alan_competition v20140912_alan
alan 11 years ago
parent 64eb4d362c
commit dea1a299af

@ -67,12 +67,15 @@
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<table class="content-text-list"> <table class="content-text-list">
<tr> <tr>
<td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %></td> <td colspan="2" valign="top" width="50">
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %>
</td>
<td> <td>
<table width="640px" border="0"> <table width="640px" border="0">
<tr> <tr>
<td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %> <td valign="top" width="500px" class=" <%= topic.sticky? ? 'sticky' : '' %>
<%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %> <%= topic.locked? ? 'locked' : '' %>">
<%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %>
</td> </td>
<td align="right" rowspan="3"> <td align="right" rowspan="3">
<table class="borad-count"> <table class="borad-count">

@ -9,8 +9,12 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><a href="http://contest.trustie.net/">contest.trustie.net</td> <td style="padding-left: 8px">
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'welcome', :action => 'contest' %> > 详情</td> <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 %> > 详情</td>
</tr> </tr>
</table> </table>
</div> </div>

@ -3,8 +3,23 @@
<%= l(:bale_news_notice) %> <%= l(:bale_news_notice) %>
</div> </div>
<div class="box tabular"> <div class="box tabular">
<p><%= f.text_field :title, :required => true, :size => 60,:maxlength => 60, :style => "width:488px;" %></p> <p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %></p> <%= f.text_field :title,
:required => true,
:size => 60,
:maxlength => 60,
:style => "width:488px;"
%>
</p>
<p>
<%= f.text_area :description,
:required => true,
:cols => 60,
:rows => 11,
:class => 'wiki-edit',
:style => "width:490px;"
%>
</p>
</div> </div>

@ -2,24 +2,47 @@
<table><tr><td><img src="/images/new/news.png" width="40" height="40"/></td><td><%#= link_to h(news.title), news_path(news) %> <table><tr><td><img src="/images/new/news.png" width="40" height="40"/></td><td><%#= link_to h(news.title), news_path(news) %>
<%#= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %> <%#= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
<%# unless news.summary.blank? %></td><td><span class="fontligher"><%#=h news.summary %></span><% end %></td> <%# unless news.summary.blank? %></td><td><span class="fontligher"><%#=h news.summary %></span></td>
<td><span class="author"><%#= authoring news.created_on, news.author %></span></td></tr></table></p>--> <td><span class="author"><%#= authoring news.created_on, news.author %></span></td></tr></table></p>-->
<table width="660px" border="0" align="center"> <table width="660px" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td> <td colspan="2" valign="top" width="50" >
<img src="/images/new/news.png" width="40" height="40"/>
</td>
<td><table width="580px" border="0"> <td><table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong> <%=link_to contestnotifications.author,contest_contestnotification_path(contestnotifications)%></strong> <td colspan="2" valign="top">
<a class="font_lighter"><%= l(:label_project_newshare) %></a> <%= link_to h(contestnotifications.title), contest_contestnotification_path(contestnotifications) %> <strong>
<%=link_to contestnotifications.author,
contest_contestnotification_path(contestnotifications)
%>
</strong>
<a class="font_lighter">
<%= l(:label_project_newshare) %>
</a>
<%= link_to h(contestnotifications.title),
contest_contestnotification_path(contestnotifications)
%>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" width="580px" ><p class="font_description"><%=h contestnotifications.description%></p></td> <td colspan="2" width="580px" >
<p class="font_description">
<%=h contestnotifications.description%>
</p>
</td>
</tr> </tr>
<tr> <tr>
<td align="left"><a class="font_lighter"> <%= contestnotifications.created_at %></a></td> <td align="left">
<td width="200" align="right" class="a"><%= link_to l(:label_project_newother),contest_contestnotification_path(contestnotifications)%> <a class="font_lighter">
<%= contestnotifications.created_at %>
</a>
</td>
<td width="200" align="right" class="a">
<%= link_to l(:label_project_newother),
contest_contestnotification_path(contestnotifications)
%>
<%= "(#{l(:label_x_comments, :count => contestnotifications.notificationcomments_count)})" if contestnotifications.notificationcomments_count > 0 %> <%= "(#{l(:label_x_comments, :count => contestnotifications.notificationcomments_count)})" if contestnotifications.notificationcomments_count > 0 %>
</td> </td>
</tr> </tr>

@ -1,9 +1,15 @@
<h3><%=l(:label_news)%></h3> <h3><%=l(:label_news)%></h3>
<%= labelled_form_for @contestnotification, url: contest_contestnotification_path, :html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %> <%= labelled_form_for @contestnotification,
:url => contest_contestnotification_path,
:html => { :id => 'contestnotifications-form',
:multipart => true,
:method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %> <%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>
<%= preview_link preview_contestnotifications_path(id: @contestnotification), 'contestnotifications-form' %> <%= preview_link preview_contestnotifications_path(id: @contestnotification),
'contestnotifications-form'
%>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>

@ -1,5 +1,7 @@
<%= labelled_form_for @contestnotification, :url => contest_contestnotifications_path(@contest), :html => { :id => 'contestnotifications-form', :multipart => true } do |f| %> <%= labelled_form_for @contestnotification,
:url => contest_contestnotifications_path(@contest),
:html => { :id => 'contestnotifications-form', :multipart => true } do |f| %>
<%= render :partial => 'contestnotifications/form', :locals => { :f => f } %> <%= render :partial => 'contestnotifications/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %> <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
<%= submit_tag l(:button_cancel), :class => "whiteButton m3p10 h30",:onclick => "cancel();" %> <%= submit_tag l(:button_cancel), :class => "whiteButton m3p10 h30",:onclick => "cancel();" %>

@ -11,11 +11,16 @@
<h3><strong><%=h @contestnotification.title %></strong></h3> <h3><strong><%=h @contestnotification.title %></strong></h3>
<div id="edit-contestnotifications" style="display:none;"> <div id="edit-contestnotifications" style="display:none;">
<%= labelled_form_for @contestnotification, :url => contest_contestnotification_path(@contest), <%= labelled_form_for @contestnotification,
:html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %> :url => contest_contestnotification_path(@contest),
:html => { :id => 'contestnotifications-form',
:multipart => true,
:method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %> <%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-contestnotifications").hide(); return false;' %> <%= link_to l(:button_cancel),
"#",
:onclick => '$("#edit-contestnotifications").hide(); return false;' %>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>
</div> </div>
@ -23,7 +28,9 @@
<div id="notificationcomments" style="margin-bottom:16px;"> <div id="notificationcomments" style="margin-bottom:16px;">
<div style="margin:15px"> <div style="margin:15px">
<span class="font_description"> <%= textilizable(@contestnotification, :description) %> </span> <span class="font_description">
<%= textilizable(@contestnotification, :description) %>
</span>
<br/> <br/>
<%#= link_to_attachments @contestnotification %> <%#= link_to_attachments @contestnotification %>
<br/> <br/>
@ -31,16 +38,26 @@
<% if User.current.logged? %> <% if User.current.logged? %>
<p> <p>
<%= toggle_link l(:label_comment_add), "add_notificationcomment_form", :focus => "notificationcomment_notificationcomments" %> <%= toggle_link l(:label_comment_add),
"add_notificationcomment_form",
:focus => "notificationcomment_notificationcomments"
%>
</p> </p>
<% else %> <% else %>
<%= l(:label_user_login_notificationcomment) %> <%= l(:label_user_login_notificationcomment) %>
<%= link_to l(:label_user_login_new), signin_path %> <%= link_to l(:label_user_login_new), signin_path %>
<% end %> <% end %>
<%= form_tag( contest_contestnotification_notificationcomments_path(@contest, @contestnotification) , :id => "add_notificationcomment_form", :style => "display:none;") do %> <%= form_tag( contest_contestnotification_notificationcomments_path(@contest, @contestnotification) ,
:id => "add_notificationcomment_form",
:style => "display:none;") do %>
<div class="box"> <div class="box">
<%= text_area 'notificationcomment', 'notificationcomments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> <%= text_area 'notificationcomment',
'notificationcomments',
:cols => 80,
:rows => 15,
:class => 'wiki-edit'
%>
<%= wikitoolbar_for 'notificationcomment_notificationcomments' %> <%= wikitoolbar_for 'notificationcomment_notificationcomments' %>
</div> </div>
<p> <p>
@ -65,7 +82,9 @@
<% next if notificationcomment.new_record? %> <% next if notificationcomment.new_record? %>
<table width="660px" border="0" align="center"> <table width="660px" border="0" align="center">
<tr> <tr>
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(notificationcomment.author), :class => "avatar")%></td> <td colspan="2" valign="top" width="50" >
<%= image_tag(url_to_avatar(notificationcomment.author), :class => "avatar")%>
</td>
<td> <td>
<table width="580px" border="0"> <table width="580px" border="0">
<tr> <tr>
@ -80,7 +99,8 @@
</td> </td>
<td> <td>
<% if notificationcomment.author==User.current|| User.current.admin? %> <% if notificationcomment.author==User.current|| User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment), <%= link_to(l(:label_bid_respond_delete),
contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment),
:method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> :method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<% end %> <% end %>
</td> </td>
@ -92,7 +112,11 @@
</p></td> </p></td>
</tr> </tr>
<tr> <tr>
<td align="left"><span class="font_lighter"> <%= format_time(notificationcomment.created_at) %></span></td> <td align="left">
<span class="font_lighter">
<%= format_time(notificationcomment.created_at) %>
</span>
</td>
<td width="200" align="right" class="a"><%#= link_to_if_authorized_contest image_tag('delete.png'), {:controller => 'notificationcomments', :action => 'destroy', :id => @contestnotifications, :notificationcomment_id => notificationcomment}, <td width="200" align="right" class="a"><%#= link_to_if_authorized_contest image_tag('delete.png'), {:controller => 'notificationcomments', :action => 'destroy', :id => @contestnotifications, :notificationcomment_id => notificationcomment},
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td>
</tr> </tr>

@ -4,7 +4,10 @@
<tr> <tr>
<td colspan="2" valign="top" width="50" > <td colspan="2" valign="top" width="50" >
<% unless contest.author.nil? %> <% unless contest.author.nil? %>
<%= link_to(image_tag(url_to_avatar(contest.author), :class => 'avatar'), user_path(contest.author), :class => "avatar") %> <%= link_to(image_tag(url_to_avatar(contest.author), :class => 'avatar'),
user_path(contest.author),
:class => "avatar")
%>
<% end %> <% end %>
</td> </td>
<td> <td>
@ -12,33 +15,85 @@
<tr> <tr>
<td colspan="2" valign="top"><strong> <td colspan="2" valign="top"><strong>
<% unless contest.author.nil? %> <% unless contest.author.nil? %>
<%= link_to(contest.author, user_path(contest.author), :class => 'bid_user') %>: <%= link_to(contest.author,
user_path(contest.author),
:class => 'bid_user')
%>:
<% end %> <% end %>
&nbsp;<%= link_to(contest.name, contest_contestnotifications_path(contest), :class => 'bid_path', :target => "_blank") %></strong></td> &nbsp;<%= link_to(contest.name,
contest_contestnotifications_path(contest),
:class => 'bid_path',
:target => "_blank") %></strong></td>
</tr> </tr>
<tr> <tr>
<td width="500"> <td width="500">
<table border="0"> <table border="0">
<tr> <tr>
<td> <td>
<strong><%= l(:label_contests_reward_method) %>:&nbsp;&nbsp;<span style="word-break: break-all; color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= contest.budget%></span></strong> <strong><%= l(:label_contests_reward_method) %>:&nbsp;&nbsp;
<span style="word-break: break-all; color: #15bccf; font-family: 14px; font-family: '微软雅黑'">
<%= contest.budget%>
</span>
</strong>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="font_lighter"> <td class="font_lighter">
<!-- <span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest), :target => "_blank") %></span></strong>)</span> <!-- <span class="font_lighter">
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest), :target => "_blank") %></span></strong>)</span> --> <%= l(:label_contest_project,
<% if contest.id == 2 or contest.id == 3 or contest.id == 6 %> :count => contest.contesting_projects.count)
<%= l(:label_contest_work, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.projects.where('is_public=1').count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>) %>
(<strong><span style="font-size: 17px">
<%= link_to(contest.contesting_projects.count,
show_project_contest_path(contest),
:target => "_blank")
%></span></strong>)</span>
<span class="font_lighter">
<%= l(:label_contest_softapplication,
:count => contest.contesting_softapplications.count)
%>
(<strong><span style="font-size: 17px">
<%= link_to(contest.contesting_softapplications.count,
show_softapplication_contest_path(contest),
:target => "_blank")
%>
</span></strong>)</span> -->
<!-- modified by longjun
将 or 改成 || -->
<% if contest.id == 2 || contest.id == 3 || contest.id == 6 %>
<%= l(:label_contest_work,
:count => contest.contesting_projects.count)
%>
(<strong>
<span style="font-size: 17px">
<%= link_to(contest.projects.where('is_public=1').count,
show_attendingcontest_contest_path(contest),
:target => "_blank")
%>
</span>
</strong>)
<% else %> <% else %>
<%= l(:label_contest_work, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_attendingcontest_contest_path(contest), :target => "_blank") %></span></strong>) <%= l(:label_contest_work,
:count => contest.contesting_softapplications.count)
%>
(<strong>
<span style="font-size: 17px">
<%= link_to(contest.contesting_softapplications.count,
show_attendingcontest_contest_path(contest),
:target => "_blank") %>
</span>
</strong>)
<% end %> <% end %>
</td> </td>
</tr> </tr>
</table></td> </table></td>
<td width="200" align="right" class="a"><span class="font_lighter"> <%= l :label_create_time %>: <%= format_time contest.created_on %></span></td> <td width="200" align="right" class="a">
<span class="font_lighter">
<%= l :label_create_time %>: <%= format_time contest.created_on %>
</span>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
@ -58,6 +113,6 @@
<div class="pagination"> <div class="pagination">
<ul> <ul>
<ul> </ul>
</div> </div>

@ -20,17 +20,55 @@
</script> </script>
<%= error_messages_for 'contest' %> <%= error_messages_for 'contest' %>
<!--[form:project]--> <!--[form:project]-->
<p style="width:500px;"><%= l(:label_bids_form_contest_new_description) %></p> <p style="width:500px;">
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Contest::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %></p> <%= l(:label_bids_form_contest_new_description) %>
</p>
<p>
<%= f.text_field :name,
:required => true,
:size => 60,
:style => "width:490px;",
:maxlength => Contest::NAME_LENGTH_LIMIT,
:placeholder => "#{l(:label_contest_name)}"
%>
</p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 5, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %></p> <p style="margin-left:-10px;padding-right: 20px;">
<%= f.text_area :description,
:rows => 5,
:class => 'wiki-edit',
:style => "font-size:small;width:490px;margin-left:10px;",
:maxlength => Contest::DESCRIPTION_LENGTH_LIMIT,
:placeholder => "#{l(:label_contest_description)}"
%>
</p>
<p style="margin-left:-10px;"><%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> <p style="margin-left:-10px;">
<%= f.text_field :password,
:size => 60,
:style => "width:488px;margin-left: 10px;"
%>
</p>
<p> <p>
<%= f.text_area :budget, :required => true, :size => 60,:rows => 4,:maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :style => "width:490px;", :placeholder => l(:label_bids_reward_what) %> <%= f.text_area :budget,
:required => true,
:size => 60,
:rows => 4,
:maxlength => Contest::DESCRIPTION_LENGTH_LIMIT,
:style => "width:490px;",
:placeholder => l(:label_bids_reward_what)
%>
<!-- 设置奖项设置的打开 关闭开关--> <!-- 设置奖项设置的打开 关闭开关-->
</p> </p>
<!-- <em class="info" style="margin-left:95px;"><%= l(:text_contest_reward) %></em> --> <!-- <em class="info" style="margin-left:95px;"><%= l(:text_contest_reward) %></em> -->
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('contest_deadline')%></p> <p>
<%= f.text_field :deadline,
:required => true,
:size => 60,
:style => "width:150px;",
:placeholder => "#{l(:label_deadline)}"
%>
<%= calendar_for('contest_deadline')%>
</p>

@ -11,27 +11,55 @@
<ul class="message-for-user"> <ul class="message-for-user">
<% for journal in journals%> <% for journal in journals%>
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user"> <li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span> <span class="portrait">
<%= image_tag(url_to_avatar(journal.user), :class => "avatar") %>
</span>
<span class="body"> <span class="body">
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span> <span class="user">
<span class="font_lighter"><% label = l(:label_contest_requirement) %></span> <%= link_to journal.user, user_path(journal.user)%>
</span>
<span class="font_lighter">
<% label = l(:label_contest_requirement) %>
</span>
<div> <%= textilizable journal.notes%> </div> <div> <%= textilizable journal.notes%> </div>
<span class="font_lighter"><%= l(:label_bids_published) %>&nbsp;<%= time_tag(journal.created_on).html_safe %>&nbsp;<%= l(:label_bids_published_ago) %></span> <span class="font_lighter">
<%= l(:label_bids_published) %>&nbsp;
<%= time_tag(journal.created_on).html_safe %>&nbsp;
<%= l(:label_bids_published_ago) %>
</span>
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<span> <span>
<% if reply_allow %> <% if reply_allow %>
<%#= link_to(l(:button_quote), {:controller => 'contests', :action => 'new', :id => contest, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%> <%#= link_to(l(:button_quote), {:controller => 'contests', :action => 'new', :id => contest, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%>
<%= link_to(l(:button_quote), contests_path(:id => contest, :journal_id => journal), :remote => true, :method => 'post', :title => l(:button_quote))%> <%= link_to(l(:button_quote),
<%= link_to l(:label_bid_respond_quote),'', contests_path(:id => contest,
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;"}%> :journal_id => journal),
:remote => true,
:method => 'post',
:title => l(:button_quote))
%>
<%= link_to l(:label_bid_respond_quote),
'',
{:focus => 'project_respond',
:onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}: '); $('##{ids} textarea') ;return false;"
}
%>
<% end %> <% end %>
<% if @user==User.current|| User.current.admin? %> <% if @user==User.current|| User.current.admin? %>
<%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm), <%#= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> :remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %> <!-- modified by longjun -->
<%= link_to(l(:label_bid_respond_delete),
words_destroy_path(:user_id => @user, :object_id => journal),
:remote => true,
:confirm => l(:text_are_you_sure),
:method => 'delete',
:class => "delete",
:title => l(:button_delete)) %>
<% end %> <% end %>
</span> </span>
</span> </span>
@ -40,7 +68,9 @@
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<% if reply_allow %> <% if reply_allow %>
<div id='<%= ids %>' class="respond-form"> <div id='<%= ids %>' class="respond-form">
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %> <%= render :partial => 'words/new_respond',
:locals => {:journal => journal, :m_reply_id => journal}
%>
</div> </div>
<% end %> <% end %>
<div style="clear: both;"></div> <div style="clear: both;"></div>

@ -26,8 +26,9 @@
<td style="color: #ec6300;" align="right" valign="0.1em" width="16%"> <td style="color: #ec6300;" align="right" valign="0.1em" width="16%">
<strong> <strong>
<span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 --> <span id="reward_result_<%=c_project.id%>"> <!-- 调用js进行刷新 -->
<%= l(:label_system_grade) %>:<%= (c_project.project.project_status.nil? ? 0.0 : c_project.project.project_status.grade) unless (c_project.project.project_status.nil? && c_project.project.nil?) %> <%= l(:label_system_grade) %>:
<% if get_prize(c_project).nil? or get_prize(c_project) == "" %> <%= (c_project.project.project_status.nil? ? 0.0 : c_project.project.project_status.grade) unless (c_project.project.project_status.nil? && c_project.project.nil?) %>
<% if get_prize(c_project).nil? || get_prize(c_project) == "" %>
<% if @contest.deadline < Date.today %> <% if @contest.deadline < Date.today %>
<%= l(:label_noawards)%> <%= l(:label_noawards)%>
<% end %> <% end %>

@ -6,7 +6,10 @@
<tr> <tr>
<td><strong><%=l(:label_softapplication)%>:</strong></td> <td><strong><%=l(:label_softapplication)%>:</strong></td>
<td> <td>
<%= link_to(c_softapplication.softapplication.name, softapplication_path(c_softapplication.softapplication), :target => '_blank') %> <%= link_to(c_softapplication.softapplication.name,
softapplication_path(c_softapplication.softapplication),
:target => '_blank')
%>
</td> </td>
</tr></br> </tr></br>
</div> </div>
@ -31,5 +34,7 @@
<% end %> <% end %>
<div class="underline-contests_three"></div> <div class="underline-contests_three"></div>
<% end %> <% end %>
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div> <div class="pagination">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
</div>

@ -50,8 +50,17 @@
<%= text_field_tag 'contest_password', nil, :size => 45 %> <%= text_field_tag 'contest_password', nil, :size => 45 %>
<p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px"> <p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px">
<%= submit_tag l(:label_new_join), :name => nil, :class => "contest_btn", :onclick => "hideModal(this);" %> <%= submit_tag l(:label_new_join),
<%= submit_tag l(:button_cancel), :name => nil, :class => "contest_btn", :onclick => "hideModal(this);", :type => 'button' %> :name => nil, :class => "contest_btn",
:onclick => "hideModal(this);"
%>
<%= submit_tag l(:button_cancel),
:name => nil,
:class => "contest_btn",
:onclick => "hideModal(this);",
:type => 'button'
%>
</p>
</td> </td>
</tr></table> </tr></table>
<% end %> <% end %>

@ -90,7 +90,14 @@
<tr style="width:700px; margin-left: -10px;"> <tr style="width:700px; margin-left: -10px;">
<span><%= l(:label_work_name) %></span> <span><%= l(:label_work_name) %></span>
<span class="contest-star"> * </span>: <span class="contest-star"> * </span>:
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:320px;", :onblur => "regexName();" %></td> <td>
<%= f.text_field :name,
:required => true,
:size => 60,
:style => "width:320px;",
:onblur => "regexName();"
%>
</td>
<span style="font-size: 10px;" id="spane_name_notice">(<%= l(:label_workname_lengthlimit) %>)</span> <span style="font-size: 10px;" id="spane_name_notice">(<%= l(:label_workname_lengthlimit) %>)</span>
</tr> </tr>
<br/> <br/>
@ -101,7 +108,12 @@
<span><%= l(:label_running_platform) %></span> <span><%= l(:label_running_platform) %></span>
<span class="contest-star"> * </span>: <span class="contest-star"> * </span>:
<td style="width: 100px"> <td style="width: 100px">
<%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:320px;", :onblur=>"regexWorkdescription();"%> <%= f.text_field :android_min_version_available,
:required => true,
:size => 60,
:style => "width:320px;",
:onblur=>"regexWorkdescription();"
%>
</td> </td>
<span style="font-size: 10px" id="spane_workdescription_notice">(<%= l(:label_workdescription_lengthlimit) %>)</span> <span style="font-size: 10px" id="spane_workdescription_notice">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr> </tr>
@ -116,7 +128,9 @@
<span> <span>
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %> <%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
</span> </span>
<%= f.select :app_type_name,work_type_opttion, {},{:style => "width:328px;",:onchange => "selectChange(this)"} %> <%= f.select :app_type_name,work_type_opttion,
{},
{:style => "width:328px;",:onchange => "selectChange(this)"} %>
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %> <%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
</td> </td>
<span style="font-size: 10px;display: none" id="other_span"> <span style="font-size: 10px;display: none" id="other_span">
@ -131,7 +145,13 @@
<tr style="width:800px;"> <tr style="width:800px;">
<span><%= l(:label_work_description) %></span> <span><%= l(:label_work_description) %></span>
<span class="contest-star"> * </span>: <span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:320px;" %></td> <td style="width: 100px">
<%= f.text_field :description,
:required => true,
:size => 60,
:style => "width:320px;"
%>
</td>
<!--span style="font-size: 10px">(<%#= l(:label_workdescription_lengthlimit) %>)</span--> <!--span style="font-size: 10px">(<%#= l(:label_workdescription_lengthlimit) %>)</span-->
</tr> </tr>
<br/> <br/>
@ -141,8 +161,17 @@
<tr style="width:800px;"> <tr style="width:800px;">
<span><%= l(:label_softapplication_developers) %></span> <span><%= l(:label_softapplication_developers) %></span>
<span class="contest-star"> * </span>: <span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:320px;", :onblur => 'regexDevelopers();' %></td> <td style="width: 100px">
<span style="font-size: 10px" id="span_softapplication_application_developers">(<%= l(:label_workdescription_lengthlimit) %>)</span> <%= f.text_field :application_developers,
:required => true,
:size => 60,
:style => "width:320px;",
:onblur => 'regexDevelopers();'
%>
</td>
<span style="font-size: 10px" id="span_softapplication_application_developers">
(<%= l(:label_workdescription_lengthlimit) %>)
</span>
</tr> </tr>
<br/> <br/>
<br/> <br/>
@ -150,8 +179,23 @@
<tr style="width:800px;"> <tr style="width:800px;">
<span><%= l(:label_work_deposit_project) %></span> <span><%= l(:label_work_deposit_project) %></span>
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:328px;" %></span> <span style="padding-left: 4px">
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %></span><!-- new_project_path(course: 0, project_type: 0) --> <%= select_tag 'project',
options_for_select(select_option_helper(@option)),
:name => 'project',
:class => 'grayline2',
:style => "width:328px;"
%>
</span>
<span>
<!-- modified by longjun -->
<%= link_to l(:label_create_new_projects),
new_project_path(:course => 0, :project_type => 0, :host => Setting.project_domain),
:target => '_blank'
%>
<!-- end longjun -->
</span><!-- new_project_path(course: 0, project_type: 0) -->
</tr> </tr>
<br/> <br/>
<br/> <br/>
@ -177,8 +221,12 @@
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px"> <div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
<input type="button" class="enterprise" value="<%=l(:button_create) %>" onclick="submit_new_softapplication();" > <input type="button" class="enterprise" value="<%=l(:button_create) %>" onclick="submit_new_softapplication();" >
<%#= submit_tag l(:button_create) %> <%#= submit_tag l(:button_create) %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();", <%= submit_tag l(:button_cancel),
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'", :name => nil,
:onclick => "cancel();",
:type => 'button',
:class => "enterprise",
:onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %> :onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
</div> </div>
<% end %> <% end %>

@ -5,7 +5,12 @@
<td> <%= textilizable content %></td> <td> <%= textilizable content %></td>
</tr> </tr>
<tr> <tr>
<td><%= hidden_field_tag 'reference_content', params[:reference_content], :value => content%></td> <td>
<%= hidden_field_tag 'reference_content',
params[:reference_content],
:value => content
%>
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>

@ -2,7 +2,9 @@
<%= render_flash_messages %> <%= render_flash_messages %>
<table width="100%" border="0" style="padding-left: 15px"> <table width="100%" border="0" style="padding-left: 15px">
<td width="15%" class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= contesting_project.count%>)</td> <!--标注参与项目及数量--> <td width="15%" class="font_lighter" style="font-size: 15px;">
<%= l(:label_bidding_project) %>(<%= contesting_project.count%>)
</td> <!--标注参与项目及数量-->
<% if User.current.logged? %> <% if User.current.logged? %>
<td width="85%"> <td width="85%">
<div class='icon icon-add'> <!--标注我要参加及添加图标--> <div class='icon icon-add'> <!--标注我要参加及添加图标-->
@ -12,4 +14,6 @@
<% end %> <% end %>
</table> </table>
<%= render :partial=> "list_projects",:locals => {:contesting_project => contesting_project,:contest => @contest }%> <%= render :partial=> "list_projects",
:locals => {:contesting_project => contesting_project,:contest => @contest }
%>

@ -2,14 +2,23 @@
<%= render_flash_messages %> <%= render_flash_messages %>
<table width="100%" border="0" style="padding-left: 15px"> <table width="100%" border="0" style="padding-left: 15px">
<td width="15%" class="font_lighter" style="font-size: 15px;"><%= l(:label_contest_softapplication) %>(<%= @contest.contesting_softapplications.count%>)</td> <!--标注参赛应用及数量--> <td width="15%" class="font_lighter" style="font-size: 15px;">
<%= l(:label_contest_softapplication) %>
(<%= @contest.contesting_softapplications.count%>)
</td> <!--标注参赛应用及数量-->
<% if User.current.logged? %> <% if User.current.logged? %>
<td width="85%"> <td width="85%">
<div class='icon icon-add'> <!--标注我要参加及添加图标--> <div class='icon icon-add'> <!--标注我要参加及添加图标-->
<%= link_to l(:button_contesting_as_application), "javascript:void(0);", onclick: "$('#put-bid-form').toggle();" %> <%= link_to l(:button_contesting_as_application),
"javascript:void(0);",
onclick: "$('#put-bid-form').toggle();"
%>
</div> </div>
</td> </td>
<% end %> <% end %>
</table> </table>
<%= render :partial=> "list_softapplications",:locals => {:contesting_softapplication => contesting_softapplication,:contest => @contest }%> <%= render :partial=> "list_softapplications",
:locals => {:contesting_softapplication => contesting_softapplication,
:contest => @contest }
%>

@ -7,7 +7,12 @@
<td rowspan="2"> <td rowspan="2">
<% if User.current.logged? %> <% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %> <% unless User.current.user_extensions.identity == 1 %>
<%= link_to(l(:label_newtype_contest), {:controller => 'contests', :action => 'new_contest'}, :class => 'icon icon-add', :target => "_blank") %> <!--
modified by longjun
<%=link_to l(:label_newtype_contest), :controller => 'contests', :action => 'new_contest' %>
-->
<%= link_to(l(:label_newtype_contest), contest_new_contest_path, :class => 'icon icon-add', :target => "_blank") %>
<!-- end longjun -->
<% end %> <% end %>
<% end %> <% end %>
</td> </td>
@ -20,8 +25,25 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><a><%= link_to request.host()+"/contests", :controller => 'contests', :action => 'index' %> </a></td> <td style="padding-left: 8px">
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'contests', :action => 'index' %></td> <a>
<!--
modified by longjun
<%=link_to request.host()+"/contests", :controller => 'contests', :action => 'index' %>
-->
<%= link_to request.host()+"/contests", contests_path %>
<!-- end longjun -->
</a>
</td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<!--
modified by longjun
<%=link_to l(:label_contest_innovate), :controller => 'contests', :action => 'index' %>
-->
<%=link_to l(:label_contest_innovate), :controller => 'contests', :action => 'index' %>
<!-- end longjun -->
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>

@ -1,7 +1,9 @@
<!-- huang --> <!-- huang -->
<h3><%=l(:label_newtype_contest)%></h3> <h3><%=l(:label_newtype_contest)%></h3>
<%= labelled_form_for @contest, :url => {:controller => 'contests', :action => 'create_contest'}, method: :post do |f| %> <%= labelled_form_for @contest,
:url => {:controller => 'contests', :action => 'create_contest'},
method: :post do |f| %>
<div class="box tabular"> <div class="box tabular">
<%= render :partial => 'form_contest', :locals => { :f => f } %> <%= render :partial => 'form_contest', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %> <%= submit_tag l(:button_create) %>

@ -1,6 +1,7 @@
<!-- modified by longjun 将or 改成 || -->
$('#reward_result_<%= @contesting_project_id %>').html('<%= j( $('#reward_result_<%= @contesting_project_id %>').html('<%= j(
if get_prize(@c_p).nil? or get_prize(@c_p) == "" if get_prize(@c_p).nil? || get_prize(@c_p) == ""
if @contest.deadline < Date.today if @contest.deadline < Date.today
puts '未评奖' puts '未评奖'
end end

@ -1,6 +1,8 @@
<!-- modified by longjun 将or 改成 || -->
$('#reward_result_<%= @contesting_softapplication_id %>').html('<%= j( $('#reward_result_<%= @contesting_softapplication_id %>').html('<%= j(
if get_prize(@c_sa).nil? or get_prize(@c_sa) == ""
if get_prize(@c_sa).nil? || get_prize(@c_sa) == ""
if @contest.deadline < Date.today if @contest.deadline < Date.today
puts '未评奖' puts '未评奖'
end end

@ -1,6 +1,7 @@
<!-- added by bai --> <!-- added by bai -->
<p> <p>
<td><%=l(:label_contest_settings)%></td>&nbsp;&nbsp;&nbsp; <td><%=l(:label_contest_settings)%></td>
&nbsp;&nbsp;&nbsp;
</p> </p>

@ -79,16 +79,27 @@
<%= render_flash_messages %> <%= render_flash_messages %>
<!--参赛步骤--> <!--参赛步骤-->
<div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px"> <div style="padding-left: 23px; padding-bottom: 10px; color: grey; font-size: 12px">
<div><%= l(:label_wellmeaning_intimation_contentone) %></div> <div>
<div style="margin-left: 59px; padding-top: 2px">1) <%= l(:label_wellmeaning_intimation_contenttwo) %></div> <%= l(:label_wellmeaning_intimation_contentone) %>
<div style="margin-left: 59px; padding-top: 2px">2) <%= l(:label_wellmeaning_intimation_contentthree) %></div> </div>
<div style="margin-left: 59px; padding-top: 2px">
1) <%= l(:label_wellmeaning_intimation_contenttwo) %>
</div>
<div style="margin-left: 59px; padding-top: 2px">
2) <%= l(:label_wellmeaning_intimation_contentthree) %>
</div>
</div> </div>
<% if User.current.logged? %> <% if User.current.logged? %>
<div style="padding-bottom: 10px; line-height: 15px"> <div style="padding-bottom: 10px; line-height: 15px">
<div style="padding-left: 82px; font-size: 14px"> <div style="padding-left: 82px; font-size: 14px">
<span><strong><%= l(:label_attending_contest) %></strong></span> <span><strong><%= l(:label_attending_contest) %></strong></span>
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').slideToggle();" %></span> <span>
<%= link_to l(:label_new_attendingcontest_work),
"javascript:void(0);",
onclick: "$('#put-project-form').slideToggle();"
%>
</span>
</div> </div>
</div> </div>
<% else %> <% else %>

@ -2,9 +2,18 @@
<div style="margin-left: 20px;"> <div style="margin-left: 20px;">
<span class="portrait"><%= image_tag(url_to_avatar(@contest.author), :class => "avatar")%></span> <span class="portrait"><%= image_tag(url_to_avatar(@contest.author), :class => "avatar")%></span>
<span class="body"> <span class="body">
<h3><%= link_to(@contest.author.lastname+@contest.author.firstname, user_path(@contest.author))%><%= @contest.name %></h3> <h3>
<%= link_to(@contest.author.lastname+@contest.author.firstname,
user_path(@contest.author))
%>
<%= @contest.name %></h3>
<p> <p>
<strong><%= l(:label_bids_reward_method) %><span class="bonus"><%= @contest.budget%></span></strong> <strong>
<%= l(:label_bids_reward_method) %>
<span class="bonus">
<%= @contest.budget%>
</span>
</strong>
</p> </p>
<div class="bid_description" style="width: 100%;word-break:break-all;word-wrap: break-word;"> <div class="bid_description" style="width: 100%;word-break:break-all;word-wrap: break-word;">
<%= @contest.description %> <%= @contest.description %>
@ -15,7 +24,11 @@
</div> </div>
<span id="praise_tread" style="float: right"> <span id="praise_tread" style="float: right">
<%= render :partial => "/praise_tread/praise_tread", <%= render :partial => "/praise_tread/praise_tread",
:locals => {:obj => @contest,:show_flag => true,:user_id =>User.current.id,:horizontal => false}%> :locals => {:obj => @contest,
:show_flag => true,
:user_id =>User.current.id,
:horizontal => false}
%>
</span> </span>
</span> </span>
</div> </div>
@ -23,7 +36,9 @@
<div style="clear: both;"></div> <div style="clear: both;"></div>
<div id="history"> <div id="history">
<%= render :partial => 'history', :locals => { :contest => @contest, :journals => @jour, :state => false} %> <%= render :partial => 'history',
:locals => { :contest => @contest, :journals => @jour, :state => false}
%>
</div> </div>
<div class="pagination" style="float:left;"> <div class="pagination" style="float:left;">

@ -6,7 +6,10 @@
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(user), :class => "avatar") %></td> <td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(user), :class => "avatar") %></td>
<td><table width="580px" border="0"> <td><table width="580px" border="0">
<tr> <tr>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %> <td colspan="2" valign="top">
<strong>
<%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
</strong>
</td> </td>
</tr> </tr>
<tr> <tr>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save