|
|
@ -5,8 +5,10 @@
|
|
|
|
<% if @maximum_staff > 1 %>
|
|
|
|
<% if @maximum_staff > 1 %>
|
|
|
|
<p class="sub_title"><%= @competition.sub_title %></p>
|
|
|
|
<p class="sub_title"><%= @competition.sub_title %></p>
|
|
|
|
<p class="edu-txt-right inline mt20">
|
|
|
|
<p class="edu-txt-right inline mt20">
|
|
|
|
<% unless User.current.logged? %>
|
|
|
|
<% if !User.current.logged? %>
|
|
|
|
<%= link_to "创建战队", signin_path, :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %>
|
|
|
|
<%= link_to "创建战队", signin_path, :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %>
|
|
|
|
|
|
|
|
<% elsif !User.current.try(:profile_completed?) %>
|
|
|
|
|
|
|
|
<%= link_to "创建战队", 'javascript:void(0)', :class => "enroll-in-b enroll-in-b-green fr", onclick: "userProfileModal()" %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
<% if !@can_enroll %>
|
|
|
|
<% if !@can_enroll %>
|
|
|
@ -19,8 +21,10 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% unless User.current.logged? %>
|
|
|
|
<% if !User.current.logged? %>
|
|
|
|
<%= link_to "加入战队", signin_path, :remote => true, :class => "enroll-in-b fr" %>
|
|
|
|
<%= link_to "加入战队", signin_path, :remote => true, :class => "enroll-in-b fr" %>
|
|
|
|
|
|
|
|
<% elsif !User.current.try(:profile_completed?) %>
|
|
|
|
|
|
|
|
<%= link_to "加入战队", 'javascript:void(0)', :class => "enroll-in-b fr", onclick: "userProfileModal()" %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
<% if !@can_enroll %>
|
|
|
|
<% if !@can_enroll %>
|
|
|
@ -153,6 +157,14 @@
|
|
|
|
pop_box_new(htmlvalue, 500, 205);
|
|
|
|
pop_box_new(htmlvalue, 500, 205);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function userProfileModal() {
|
|
|
|
|
|
|
|
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix">提示</div>'+
|
|
|
|
|
|
|
|
'<div class="task-popup-content"><p class="task-popup-text-center font-16">您需要去完善您的个人资料,才能使用此功能</p></div>' +
|
|
|
|
|
|
|
|
'<div class="task-popup-submit clearfix"><a href="javascript:void(0);" onclick="hideModal();" class="task-btn fl">取消</a>'+
|
|
|
|
|
|
|
|
'<a href="/my/account" class="task-btn task-btn-orange fr" target="_blank" onclick="hideModal();">立即完善</a></div></div>';
|
|
|
|
|
|
|
|
pop_box_new(htmlvalue, 480, 205);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function joinSure() {
|
|
|
|
function joinSure() {
|
|
|
|
if ($("#codeinput").val().trim() == "") {
|
|
|
|
if ($("#codeinput").val().trim() == "") {
|
|
|
|
$("#codeInput-notice").html("请输入邀请码");
|
|
|
|
$("#codeInput-notice").html("请输入邀请码");
|
|
|
|