Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/views/layouts/base_projects.html.erb
This commit is contained in:
commit
f2c87f198d
|
@ -1,3 +1,4 @@
|
|||
// @status: 0 该项目不存在;1 不重复加入;2 成功加入; 3 已是项目成员;其它 加入失败
|
||||
<% if @status == 0%>
|
||||
alert("<%= l('project.join.tips.notexist') %>");
|
||||
<% elsif @status == 1%>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<% is_float ||= false %>
|
||||
<% for attachment in attachments %>
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:10px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<span><%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %>
|
||||
</span><span class="c_grey fr"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
<!--<p><%#= textilizable journal.notes%></p>-->
|
||||
<p><%=journal.notes.html_safe%>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
.C_form{ margin:20px 0 0 60px;}
|
||||
.C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; padding-left: 60px;}
|
||||
.C_form ul li input{ margin-left:20px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding: 0 !important; }
|
||||
.C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:150px;}
|
||||
.C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:140px;}
|
||||
.width190{ width:190px; height:26px; border-color:#e1e1e1;}
|
||||
.C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;}
|
||||
.C_form a:hover{ text-decoration:underline;}
|
||||
|
@ -52,25 +52,25 @@
|
|||
</div>
|
||||
<div class="C_form">
|
||||
<%= form_tag({:controller => 'applied_project',
|
||||
:action => 'applied_join_project'},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-watcher-form') do %>
|
||||
:action => 'applied_join_project'},
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-watcher-form') do %>
|
||||
<ul>
|
||||
<li style="padding-top: 15px;">
|
||||
<span class="tips"><%= l('project.join.id.label')%></span>
|
||||
<input type="hidden" name="project_join" value="1">
|
||||
<input type="hidden" name="user_id" value="<%= User.current.id%>">
|
||||
<input type="hidden" name="user_id" value="<%= User.current.id %>">
|
||||
<input class=" width190" name="project_id" id="project_id" type="text" value="" >
|
||||
<input type="text" style="display: none"/>
|
||||
</li>
|
||||
<li class="mB5" style="width: 260px"><%= l('project.join.id.tips')%></li>
|
||||
<li>
|
||||
<a href="#" class="btn" style="margin-left: 50px;" onclick="submit_form(this);">
|
||||
<%= l(:label_apply_project) %>
|
||||
<%= l(:label_apply_project) %>
|
||||
</a>
|
||||
<a href="#" class="btn" style="margin-left: 20px;" onclick="hideModal(this);">
|
||||
<%= l(:button_cancel)%>
|
||||
<%= l(:button_cancel) %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,54 +1,53 @@
|
|||
<% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
|
||||
<%= if show_revision_graph && revisions && revisions.any?
|
||||
indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
|
||||
url_for(
|
||||
:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => scmid)
|
||||
end
|
||||
render :partial => 'revision_graph',
|
||||
:locals => {
|
||||
:commits => indexed_commits,
|
||||
:space => graph_space
|
||||
}
|
||||
end %>
|
||||
indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
|
||||
url_for(
|
||||
:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => scmid)
|
||||
end
|
||||
render :partial => 'revision_graph',
|
||||
:locals => {
|
||||
:commits => indexed_commits,
|
||||
:space => graph_space
|
||||
}
|
||||
end %>
|
||||
<%= form_tag(
|
||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
||||
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
||||
<%= link_to_revision(changeset, @repository) %>
|
||||
<% end %>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="padding-top: 10px;">
|
||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
||||
:method => :get
|
||||
) do %>
|
||||
<table class="list changesets">
|
||||
<thead><tr>
|
||||
<th>#</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
<th><%= l(:field_author) %></th>
|
||||
<th><%= l(:field_comments) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% show_diff = revisions.size > 1 %>
|
||||
<% line_num = 1 %>
|
||||
<% revisions.each do |changeset| %>
|
||||
<tr class="changeset <%= cycle 'odd', 'even' %>">
|
||||
<% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
|
||||
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
|
||||
<%= link_to_revision(changeset, @repository) %>
|
||||
<% end %>
|
||||
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
||||
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
||||
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
|
||||
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td>
|
||||
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
|
||||
</tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p style="padding-top: 10px;">
|
||||
<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
||||
</p>
|
||||
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<div class="repository_con" style="line-height:1.9;">
|
||||
<div class="repositorytitle" style="float:left;">
|
||||
<%= render :partial => 'breadcrumbs',
|
||||
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
||||
<%= render :partial => 'navigation' %>
|
||||
|
||||
</div>
|
||||
<!--contextual end-->
|
||||
<div class="cl"></div>
|
||||
|
@ -25,8 +24,8 @@
|
|||
link_to h(repo.name),
|
||||
{:controller => 'repositories', :action => 'show',
|
||||
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
||||
:class => 'repository' + (repo == @repository ? ' selected' : ''),
|
||||
:class => "mb10 break_word c_orange" }.join(' | ').html_safe %>)
|
||||
:class => 'repository' + (repo == @repository ? ' selected' : ''),
|
||||
:class => "mb10 break_word c_orange" }.join(' | ').html_safe %>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,7 +35,7 @@
|
|||
<div class=" c_dark f14">
|
||||
<p>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。</p>
|
||||
<p>通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。
|
||||
如果是首次提交代码,执行如下命令:</p>
|
||||
如果是首次提交代码,执行如下命令:</p>
|
||||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git init</p>
|
||||
|
@ -53,7 +52,7 @@
|
|||
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -68,7 +67,7 @@
|
|||
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -81,7 +80,7 @@
|
|||
|
||||
<p>git push origin branch_name</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:</p>
|
||||
</div>
|
||||
|
@ -101,56 +100,59 @@
|
|||
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
|
||||
</div>
|
||||
</div>
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
<!-- 代码库显示 -->
|
||||
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
||||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<% if @changesets && !@changesets.empty? %>
|
||||
<h3>
|
||||
<%= l(:label_latest_revision_plural) %>
|
||||
</h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil} %>
|
||||
<!-- 代码修订 -->
|
||||
<% if authorize_for('repositories', 'revisions') %>
|
||||
<%# if @changesets && !@changesets.empty? %>
|
||||
<h3>
|
||||
<%= l(:label_latest_revision_plural) %>
|
||||
</h3>
|
||||
<%= render :partial => 'revisions',
|
||||
:locals => {:project => @project, :path => @path,
|
||||
:revisions => @changesets, :entry => nil} %>
|
||||
<%# end %>
|
||||
|
||||
<p style="padding-top: 10px;">
|
||||
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
|
||||
sep = '' %>
|
||||
<% if @repository.supports_all_revisions? && @path.blank? %>
|
||||
<%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param},
|
||||
:class => "orange_u_btn" %>
|
||||
<% sep = '|' %>
|
||||
<% end %>
|
||||
<p style="padding-top: 10px;">
|
||||
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
|
||||
sep = '' %>
|
||||
<% if @repository.supports_all_revisions? && @path.blank? %>
|
||||
<%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project,
|
||||
:repository_id => @repository.identifier_param},
|
||||
:class => "orange_u_btn" %>
|
||||
<% sep = '|' %>
|
||||
<% end %>
|
||||
<% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %>
|
||||
<%= sep %>
|
||||
<%= link_to l(:label_view_revisions),
|
||||
{:action => 'changes',
|
||||
:path => to_path_param(@path),
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => @rev},
|
||||
:class => "orange_u_btn" %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @repository.supports_all_revisions? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(
|
||||
:atom, params.merge(
|
||||
{:format => 'atom', :action => 'revisions',
|
||||
:id => @project, :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
<% if @repository.supports_directory_revisions? && (has_branches || !@path.blank? || !@rev.blank?) %>
|
||||
<%= sep %>
|
||||
<%= link_to l(:label_view_revisions),
|
||||
{:action => 'changes',
|
||||
:path => to_path_param(@path),
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:rev => @rev},
|
||||
:class => "orange_u_btn" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @repository.supports_all_revisions? %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(
|
||||
:atom, params.merge(
|
||||
{:format => 'atom', :action => 'revisions',
|
||||
:id => @project, :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<!-- added by bai -->
|
||||
<p class="fb c_dark mt10">查看如何提交代码:
|
||||
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
|
||||
<%= link_to('English', en_usage_path, :class => "c_blue") %>
|
||||
<!-- added by bai -->
|
||||
<p class="fb c_dark mt10">查看如何提交代码:
|
||||
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
|
||||
<%= link_to('English', en_usage_path, :class => "c_blue") %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span><%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
<!--<p><%#= textilizable journal.notes%></p>-->
|
||||
<p><%=journal.notes.html_safe%></p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
|
|
@ -213,9 +213,13 @@
|
|||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("#new_message_cancel_btn");
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= reply.notes %>
|
||||
<%= reply.notes.html_safe %>
|
||||
</p>
|
||||
<span class="c_grey fl">
|
||||
<%= format_time reply.created_on %>
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
<p nhname="contentmsg"></p>
|
||||
<div style="padding-top:5px;float:left;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-top: 5px;"%>
|
||||
<a href="javascript:;" id="new_message_cancel_btn" style="display:none;"></a>
|
||||
<%else %>
|
||||
<div style="font-size: 14px;margin:10px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
|
|
|
@ -3,4 +3,7 @@ $('#history').html('<%= escape_javascript(render(:partial => 'users/history',:lo
|
|||
$('#jour_count').html('<%= @obj_count%>')
|
||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#new_form_user_message').val("");
|
||||
if($('#new_message_cancel_btn') != undefined && $('#new_message_cancel_btn').length!=0){
|
||||
$('#new_message_cancel_btn').click();
|
||||
}
|
||||
$('#new_form_reference_user_id').val("");
|
|
@ -5620,8 +5620,8 @@ _plugin('core', function(K) {
|
|||
afterUpload : function(data) {
|
||||
if (data.error === 0) {
|
||||
var url = K.formatUrl(data.url, 'absolute');
|
||||
//self.exec('insertimage', url, 'image','','','1','left');
|
||||
self.insertHtml('<img src="'+url+'"/>');
|
||||
self.exec('insertimage', url, 'image','','','1','left');
|
||||
//self.insertHtml('<img src="'+url+'"/>');
|
||||
var asset_id = data.asset_id;
|
||||
if ( asset_id != "" && parent.document.getElementById('asset_id') != null ) {
|
||||
parent.document.getElementById('asset_id').value += asset_id.toString();
|
||||
|
|
Loading…
Reference in New Issue