修改版本界面

未完成部分,隔行换色
This commit is contained in:
huang 2015-04-13 21:08:26 +08:00
parent 6ce998bb54
commit 2b063db0cc
3 changed files with 47 additions and 126 deletions

View File

@ -21,7 +21,7 @@ include AvatarHelper
module ProjectsHelper
def link_to_version(version, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, options
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02"
end
def project_settings_tabs

View File

@ -1,140 +1,59 @@
<% if @project.shared_versions.any? %>
<table class="pro_table">
<tbody>
<tr class="pro_table_tit">
<td class="w150">版本</td>
<td class="w1150"> 日期</td>
<td class="w210">描述 </td>
<td class="w1150">状态</td>
<td class="w190">共享</td>
<td class="w190">Wiki 页面</td>
<td class="w150"><%= l(:label_version) %></td>
<td class="w1150"> <%= l(:field_effective_date) %></td>
<td class="w210"><%= l(:field_description) %> </td>
<td class="w1150"><%= l(:field_status) %></td>
<td class="w190"><%= l(:field_sharing) %></td>
<td class="w190"><%= l(:label_wiki_page) %></td>
<td class="w1150"></td>
</tr>
<tr class="pro_table_on">
<% for version in @project.shared_versions.sort %>
<tr class="pro_table_on">
<td >
<a href="/versions/1" class="c_blue02">暑期版(Summer Beta) V0.8</a>
<a class="c_blue02"><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
</td>
<td class="c_grey"><%= format_date(version.effective_date) %></td>
<td class="description" style="word-break:break-all"><%=h version.description %></td>
<td class="status"><%= l("version_status_#{version.status}") %></td>
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">
<%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki',
:action => 'show',
:project_id => version.project,
:id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
</td>
<td class="c_grey">2013-08-30</td>
<td class="description"></td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
</td>
</tr>
<tr >
<td >
<a href="/versions/1" class="c_blue02">正式版(First Release) V1.0</a>
</td>
<td class="c_grey">2013-11-01</td>
<td class="description">正式对外提供服务的版本</td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
</td>
</tr>
<tr class="pro_table_on">
<td >
<a href="/versions/1"class="c_blue02">商业版(Second Release) V2.0</a>
</td>
<td class="c_grey">2013-08-30</td>
<td class="description">增加在线支付、实名认证等功能,界面更加美化,用户交互更加友好!</td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
</td>
</tr>
<tr >
<td >
<a href="/versions/1" class="c_blue02">JACK SUMMER V0.8</a>
</td>
<td class="c_grey">2014-08-25</td>
<td class="description">试用人员的开发版本</td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
</td>
</tr>
<tr class="pro_table_on">
<td >
<a href="/versions/1" class="c_blue02">LongJun Contest - V1.0</a>
</td>
<td class="c_grey"></td>
<td class="description">contest网站的开发分支</td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
</td>
</tr>
<tr >
<td >
<a href="/versions/1" class="c_blue02">SZZH V1.1 (Supported by BJSZZH)</a>
</td>
<td class="c_grey"></td>
<td class="description">神舟公司外包开发版本</td>
<td class="status">打开</td>
<td class="sharing">不共享</td>
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title=""></td>
<td >
<a href="/versions/1/edit" class=" c_purple">编辑</a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" >删除</a>
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
<a href="/versions/1" class=" c_purple" data-confirm="您确定要删除吗?" ><%= delete_link version_path(version) %></a>
<% end %>
</td>
</tr>
<% end; reset_cycle %>
</tbody>
<% else %>
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>
</table>
<a href="/projects/2/versions/close_completed" class="c_orange fr">关闭已完成的版本</a>
<% if @project.versions.any? %>
<%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %>
<% end %>
<a href="javascript:viod(0)" class="pic_add fl mr5" onclick="pro_st_show_ban();"></a>
<a href="javascript:viod(0)" class="c_blue fl" onclick="pro_st_show_ban();">新建版本</a>
<%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'c_blue fl' if User.current.allowed_to?(:manage_versions, @project) %>
<div class="cl"></div>
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
<ul>
<li >
<label class="label02"><span class="c_red">*</span>&nbsp;名称&nbsp;&nbsp;</label>
<input type="text" name="" class=" w280" >
</li>
<li >
<label class="label02">&nbsp;描述 &nbsp;&nbsp;</label>
<input type="text" name="" class=" w280" >
</li>
<li >
<label class="label02">&nbsp;状态&nbsp;&nbsp;</label>
<select id="" name="">
<option value="" selected="selected">打开</option>
<option value="">锁定</option>
<option value="">关闭</option>
</select>
</li>
<li >
<label class="label02">&nbsp;Wiki 页面&nbsp;&nbsp;</label>
<input type="text" name="" class=" w280" >
</li>
<li >
<label class="label02">&nbsp;日期 &nbsp;&nbsp;</label>
<input type="text" name="" class=" fl" >
<a href="javascript:viod(0)" class="pic_date mt5 ml5"></a>
</li>
<div class="cl mb10"></div>
<li >
<label class="label02">&nbsp;共享 &nbsp;&nbsp;</label>
<select id="" name="">
<option value="" selected="selected">不共享 </option>
<option value="">共享 </option>
</select>
</li>
<a href="javascript:viod(0)" class="blue_btn ml110">保存</a>
</ul>
</div>
</div>

View File

@ -178,4 +178,6 @@ function project_setting(n)
$("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis");
}
}
}
}
// 背景换色