版本库界面及样式
This commit is contained in:
parent
bb9ba14c47
commit
b8d86fcd42
|
@ -2226,6 +2226,22 @@ module ApplicationHelper
|
|||
s
|
||||
end
|
||||
|
||||
# 获取issue类型
|
||||
def get_issue_type_new tracker_id
|
||||
case tracker_id
|
||||
when 1
|
||||
"缺陷"
|
||||
when 2
|
||||
"功能"
|
||||
when 3
|
||||
"支持"
|
||||
when 4
|
||||
"任务"
|
||||
when 5
|
||||
"周报"
|
||||
end
|
||||
end
|
||||
|
||||
def get_memo
|
||||
@new_memo = Memo.new
|
||||
@public_forum = Forum.find(1) rescue ActiveRecord::RecordNotFound
|
||||
|
|
|
@ -7,11 +7,8 @@
|
|||
</div>
|
||||
<div class="content-big">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<%= link_to activity.try(:author).show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
|
@ -40,18 +37,8 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
<span class="fl" title="缺陷">【缺陷】</span>
|
||||
<% when 2%>
|
||||
<span class="fl" title="功能">【功能】</span>
|
||||
<% when 3%>
|
||||
<span class="fl" title="支持">【支持】</span>
|
||||
<% when 4%>
|
||||
<span class="fl" title="任务">【任务】</span>
|
||||
<% when 5%>
|
||||
<span class="fl" title="周报">【周报】</span>
|
||||
<% end %>
|
||||
<span class="fl">【<%= get_issue_type_new(activity.tracker_id) %>】</span>
|
||||
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey ml5", :target => "_blank" %>
|
||||
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'>
|
||||
<%= get_issue_priority(activity.priority_id)[1] %>
|
||||
|
|
|
@ -4,19 +4,19 @@
|
|||
<% sub_path = entry.path[0] == "/" ? entry.path.sub("/", "") : entry.path %>
|
||||
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(sub_path) %>
|
||||
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
|
||||
<%# latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_path, @g) %>
|
||||
<% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_path, @g) %>
|
||||
|
||||
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
|
||||
<td style="padding-left: <%=18 * depth%>px;" class="filename_no_report hidden">
|
||||
<% if entry.is_dir? %>
|
||||
<%# 展开文件目录 %>
|
||||
<%# 展开文件目录 %>
|
||||
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
||||
:action => 'show',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => to_path_param(ent_path),
|
||||
:rev => @rev,
|
||||
# :latest_changes => latest_changes,
|
||||
:latest_changes => latest_changes,
|
||||
:depth => (depth + 1),
|
||||
:parent_id => tr_id)) %>');"> </span>
|
||||
<% end %>
|
||||
|
@ -26,49 +26,21 @@
|
|||
</td>
|
||||
<div id="children_tree">
|
||||
<td class="tree-comments c_grey hidden">
|
||||
<div class="hidden" id="changes_message_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= (latest_changes.message) if latest_changes %>">
|
||||
<%= (latest_changes.message) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tree-author c_grey">
|
||||
<div class="hidden" id="changes_author_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= (latest_changes.author_name) if latest_changes %>">
|
||||
<%= (latest_changes.author_name) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tree-age c_grey">
|
||||
<div class="hidden" id="changes_time_<%= tr_id %>">
|
||||
<div class="hidden" title="<%= format_time(latest_changes.time) if latest_changes %>">
|
||||
<%# 为了转换UTC时间,时差8小时 %>
|
||||
<%= link_to tree_head_message_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch) %>
|
||||
<%= distance_of_time_in_words(latest_changes.time, Time.now) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</tr>
|
||||
|
||||
<!--<!–<script>–>-->
|
||||
<!--// $("#changes_message_<%#=tr_id %>").html("999")-->
|
||||
<!--// $("#changes_author_<%#=tr_id %>").html("<%#= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>")-->
|
||||
<!--// $("#changes_time_<%#=tr_id %>").html("<%#= distance_of_time_in_words(get_trees_last_changes(@project.gpid, @rev, ent_path, @g).time, Time.now) %>")-->
|
||||
<!--<!–</script>–>-->
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$.ajax({
|
||||
type:"GET",
|
||||
url:"Venue.aspx?act=init",
|
||||
dataType:"html",
|
||||
success:function(result){ //function1()
|
||||
f1();
|
||||
f2();
|
||||
}
|
||||
|
||||
failure:function (result) {
|
||||
alert('Failed');
|
||||
}
|
||||
}
|
||||
|
||||
alert("test");
|
||||
alert(<%#= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>);
|
||||
document.getElementById('changes_author_<%=tr_id %>').html(<%= get_trees_last_changes(@project.gpid, @rev, ent_path, @g).author_name %>);
|
||||
});
|
||||
</script>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% project = Project.find(activity.act_id) %>
|
||||
<% user = User.find(project.user_id)%>
|
||||
<div class="container-big mt10">
|
||||
<div class="pr">
|
||||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="content-big">
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
|
||||
|
|
Loading…
Reference in New Issue