Merge remote-tracking branch 'origin/dev_hjq' into dev_hjq

dev_repository_hjq
lizanle 10 years ago
commit 10bd7c2855

@ -46,6 +46,26 @@ module JournalsHelper
content.html_safe content.html_safe
end end
def render_links_easy(issue, journal, options={})
content = ''
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
destroyable = User.current.logged? && ((journal.user == User.current) || (issue.author_id == User.current.id) || (User.current.admin == 1))
links = []
if !journal.notes.blank?
links << link_to(l(:button_quote),
{:controller => 'journals', :action => 'new', :id => issue.id, :journal_id => journal},
:remote => true,
:method => 'post',
:title => l(:button_quote)) if options[:reply_links]
if destroyable
links << link_to(l(:button_delete), { :controller => 'journals', :action => 'destroy', :id => journal, :format => 'js' },
:title => l(:button_delete))
end
end
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
content.html_safe
end
def render_notes (issue, journal, options={}) def render_notes (issue, journal, options={})
content = '' content = ''
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))

@ -32,6 +32,9 @@
%> %>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %> <% end %>
</span> </span>
<script type='text/javascript'> <script type='text/javascript'>

@ -13,3 +13,18 @@
</p> </p>
<% end %> <% end %>
</div> </div>
<div class="talk_txt fl">
<%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %>
<% if topic.sticky? %>
<a href="javascript:void(0)" class="talk_up fr c_red"><%= l(:label_board_sticky)%></a>
<% end %>
<br/>
<%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %>
&nbsp;<%= l(:label_post_by_time)%><%= format_time topic.created_on %>
</div>
<span class="talk_btn fr"><%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;line-height: 18px;" %></span>
<div class="cl"></div>
</div><!--讨论主类容 end-->

@ -44,19 +44,17 @@
<% end %> <% end %>
<!-- 内容显示部分 --> <!-- 内容显示部分 -->
<div class="project_right"> <div class="talk_top">
<div class="fl"><span><%= l(:label_project_board_count , :count => @topic_count)%></span></div>
<div class="talk_top"> <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<div class="fl"><span><%= l(:label_project_board_count , :count => @topic_count)%></span></div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span><%= link_to l(:project_module_boards_post), new_board_message_path(@board), <span><%= link_to l(:project_module_boards_post), new_board_message_path(@board),
:class => 'problem_new_btn fl c_dorange', :class => 'problem_new_btn fl c_dorange',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span> :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<!-- 帖子内容显示 --> <!-- 帖子内容显示 -->
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<div class="problem_main"> <div class="problem_main">
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %> <%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %>
@ -76,7 +74,7 @@
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
<ul class="wlist"> <ul class="wlist">
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %> <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
</ul> </ul>
<!--讨论主类容 end--> <!--讨论主类容 end-->

@ -47,7 +47,8 @@
:method => 'get', :method => 'get',
:title => l(:label_version_new), :title => l(:label_version_new),
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %> :tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a> <%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 " %>
<!--<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a>-->
<% end %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>

@ -4,34 +4,38 @@
<!--编辑的整个属性--> <!--编辑的整个属性-->
<% if @edit_allowed || !@allowed_statuses.empty? %> <% if @edit_allowed || !@allowed_statuses.empty? %>
<div id="all_attributes" style="display:none;"> <div id="all_attributes" style="display:none;">
<%= render :partial => 'form', :locals => {:f => f} %> <%= render :partial => 'form', :locals => {:f => f} %>
<a remote="true" href="javascript:void(0)" class="blue_btn fl" style="margin-left: 80px;margin-bottom: 10px;margin-top: -10px;" onclick="$('#issue-form').submit();">
<%= l(:button_submit) %>
</a>
</div> </div>
<% end %><!--end--> <% end %><!--end-->
<div class="ping_C mb10"> </div> <div class="ping_C mb10"></div>
<!--<fieldset><legend><%#= l(:field_notes) %></legend>--> <!--<fieldset><legend><%#= l(:field_notes) %></legend>-->
<!--回复框--> <!--回复框-->
<% if @journals.present? %> <% if @journals.present? %>
<div id="history"> <div id="history">
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %> <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
</div> </div>
<% end %> <% end %>
<%= f.text_area :notes, :style =>"width:99%;", :rows => "5", :no_label => true %> <fieldset><legend>说明</legend>
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
</fieldset>
<!--<%# if @issue.safe_attribute? 'private_notes' %>--> <!--<%# if @issue.safe_attribute? 'private_notes' %>-->
<!--<label for="issue_private_notes"><%#= f.check_box :private_notes, :no_label => true %> <%#= l(:field_private_notes) %></label>--> <!--<label for="issue_private_notes"><%#= f.check_box :private_notes, :no_label => true %> <%#= l(:field_private_notes) %></label>-->
<!--<%# end %>--> <!--<%# end %>-->
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %> <%= call_hook(:view_issues_edit_notes_bottom, {:issue => @issue, :notes => @notes, :form => f}) %>
<!--</fieldset>--> <!--</fieldset>-->
<!--<fieldset><legend><%#= l(:label_attachment_plural) %></legend>--> <!--<fieldset><legend><%#= l(:label_attachment_plural) %></legend>-->
<p style="padding-top: 5px;"><%= render :partial => 'attachments/form', :locals => {:container => @issue} %> <!--<p style="padding-top: 5px;"><%= render :partial => 'attachments/new_form', :locals => {:container => @issue} %>-->
<!--</fieldset>--> <!--</fieldset>-->
<div class="cl"></div> <div class="cl"></div>
<%= f.hidden_field :lock_version %> <%= f.hidden_field :lock_version %>
<%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %> <%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id]%> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id] %>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>

@ -97,7 +97,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="newpro_box02 "> <div class="newpro_box02 ">
<label class="label"> <%= l(:label_issue_watchers) %></label> <label class="label"> <%= l(:label_issue_watchers) %></label>
<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者"> <!--<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">-->
<span class="search_for_watchers"> <span class="search_for_watchers">
<%= link_to "", <%= link_to "",
{:controller => 'watchers', :action => 'new', :project_id => @issue.project}, {:controller => 'watchers', :action => 'new', :project_id => @issue.project},

@ -18,7 +18,7 @@
</p> </p>
</div> </div>
<!--编辑、引用、回复按钮--> <!--编辑、引用、回复按钮-->
<div class="ping_disfoot"><%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div> <div class="ping_disfoot"><%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
<!--回复内容、引用内容--> <!--回复内容、引用内容-->
<p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p> <p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
<div class="cl"></div> <div class="cl"></div>

@ -14,7 +14,7 @@
<a href="#" class="blue_btn fl ml80" onclick="$('#issue-form').submit();"> <a href="#" class="blue_btn fl ml80" onclick="$('#issue-form').submit();">
<%= l(:button_create) %> <%= l(:button_create) %>
</a> </a>
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %> <%#= preview_link preview_new_issue_path(:project_id => @project), 'issue-form', 'preview', {:class => "blue_btn fl ml10"} %>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>

@ -115,11 +115,12 @@
</div> </div>
<% end %> <% end %>
<!--留言--> <!--留言-->
<br>
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="$('#issue-form').submit();"> <a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="$('#issue-form').submit();">
<%= l(:button_submit) %> <%= l(:button_submit) %>
</a> </a>
<%#= submit_tag l(:button_submit) %> <%#= submit_tag l(:button_submit) %>
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%> <%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
</div> </div>
<% if @changesets.present? %> <% if @changesets.present? %>

@ -13,7 +13,7 @@
<%= javascript_heads %> <%= javascript_heads %>
<%= heads_for_theme %> <%= heads_for_theme %>
<%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %> <%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %>
<%= javascript_include_tag 'project', 'header' %> <%= javascript_include_tag 'project', 'header','select_list_move' %>
<%= call_hook :view_layouts_base_html_head %> <%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags --> <!-- page specific tags -->
<%= yield :header_tags -%> <%= yield :header_tags -%>
@ -157,7 +157,7 @@
<!--邀请加入--> <!--邀请加入-->
<div class="subNavBox"> <div class="subNavBox">
<% if User.current.member_of?(@project) %> <% if User.current.member_of?(@project) %>
<div class="subNav currentDd currentDt subNav_jiantou"><%= l(:label_invite)%></div> <div class="subNav currentDd currentDt subNav_jiantou" id="expand_tools_expand_invit" onclick="expand_tools_expand('invit');"><%= l(:label_invite)%></div>
<ul class="navContent " style="display:block"> <ul class="navContent " style="display:block">
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li> <li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
<li><%= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li> <li><%= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>

@ -50,12 +50,12 @@
<div class="ping_C mb10" id="<%= "message-#{message.id}" %>"> <div class="ping_C mb10" id="<%= "message-#{message.id}" %>">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div> <div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div>
<div class="ping_discon"> <div class="ping_discon">
<div class="ping_distop"> <div class="ping_distop upload_img">
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
<span class="c_grey fr"><%= format_time(message.created_on) %></span> <span class="c_grey fr"><%= format_time(message.created_on) %></span>
<div class="cl"></div> <div class="cl"></div>
<p><%= textilizable message,:content,:attachments => message.attachments %></p> <p><%= textAreailizable message,:content,:attachments => message.attachments %></p>
<%= link_to_attachment_project message, :author => false %> <%= link_to_attachments_course message, :author => false %>
</div> </div>
<div class="ping_disfoot"> <div class="ping_disfoot">
<%= link_to( <%= link_to(

@ -1,30 +1,30 @@
<%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root', <%= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root',
:action => 'show', :id => @project, :action => 'show', :id => @project,
:repository_id => @repository.identifier_param, :repository_id => @repository.identifier_param,
:path => nil, :rev => @rev) %> :path => nil, :rev => @rev) %>
<% <%
dirs = path.split('/') dirs = path.split('/')
if 'file' == kind if 'file' == kind
filename = dirs.pop filename = dirs.pop
end end
link_path = '' link_path = ''
dirs.each do |dir| dirs.each do |dir|
next if dir.blank? next if dir.blank?
link_path << '/' unless link_path.empty? link_path << '/' unless link_path.empty?
link_path << "#{dir}" link_path << "#{dir}"
%> %>
/ <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param, / <%= link_to h(dir), :action => 'show', :id => @project, :repository_id => @repository.identifier_param,
:path => to_path_param(link_path), :rev => @rev %> :path => to_path_param(link_path), :rev => @rev %>
<% end %> <% end %>
<% if filename %> <% if filename %>
/ <%= link_to h(filename), / <%= link_to h(filename),
:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :action => 'changes', :id => @project, :repository_id => @repository.identifier_param,
:path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %> :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %>
<% end %> <% end %>
<% <%
# @rev is revsion or Git and Mercurial branch or tag. # @rev is revsion or Git and Mercurial branch or tag.
# For Mercurial *tip*, @rev and @changeset are nil. # For Mercurial *tip*, @rev and @changeset are nil.
rev_text = @changeset.nil? ? @rev : format_revision(@changeset) rev_text = @changeset.nil? ? @rev : format_revision(@changeset)
%> %>
<%= "@ #{h rev_text}" unless rev_text.blank? %> <%= "@ #{h rev_text}" unless rev_text.blank? %>

@ -1,34 +1,34 @@
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= javascript_include_tag 'repository_navigation' %> <%= javascript_include_tag 'repository_navigation' %>
<% end %> <% end %>
<a href="javascript:void(0);" class="pic_stats fl ml10 mt5"></a>
<%= link_to l(:label_statistics), <%= link_to l(:label_statistics),
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'mt5 c_blue fl' if @repository.supports_all_revisions? %> :class => 'icon icon-stats' if @repository.supports_all_revisions? %>
<%= form_tag({:action => controller.action_name, <%= form_tag({:action => controller.action_name,
:id => @project, :id => @project,
:repository_id => @repository.identifier_param, :repository_id => @repository.identifier_param,
:path => to_path_param(@path), :path => to_path_param(@path),
:rev => nil}, :rev => nil},
{:method => :get, :id => 'revision_selector'}) do -%> {:method => :get, :id => 'revision_selector'}) do -%>
<!-- Branches Dropdown --> <!-- Branches Dropdown -->
<% if !@repository.branches.nil? && @repository.branches.length > 0 -%> <% if !@repository.branches.nil? && @repository.branches.length > 0 -%>
| <%= l(:label_branch) %>: | <%= l(:label_branch) %>:
<%= select_tag :branch, <%= select_tag :branch,
options_for_select([''] + @repository.branches, @rev), options_for_select([''] + @repository.branches, @rev),
:id => 'branch' %> :id => 'branch' %>
<% end -%> <% end -%>
<% if !@repository.tags.nil? && @repository.tags.length > 0 -%> <% if !@repository.tags.nil? && @repository.tags.length > 0 -%>
| <%= l(:label_tag) %>: | <%= l(:label_tag) %>:
<%= select_tag :tag, <%= select_tag :tag,
options_for_select([''] + @repository.tags, @rev), options_for_select([''] + @repository.tags, @rev),
:id => 'tag' %> :id => 'tag' %>
<% end -%> <% end -%>
<% if @repository.supports_all_revisions? %> <% if @repository.supports_all_revisions? %>
| <%= l(:label_revision) %>: | <%= l(:label_revision) %>:
<%= text_field_tag 'rev', @rev, :size => 8 %> <%= text_field_tag 'rev', @rev, :size => 8 %>
<% end %> <% end %>
<% end -%> <% end -%>

@ -1,3 +1,4 @@
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<div class="project_r_h"> <div class="project_r_h">
<h2 class="project_h2">版本库</h2> <h2 class="project_h2">版本库</h2>
</div> </div>
@ -12,9 +13,9 @@
<div class=" c_dark f14"> <div class=" c_dark f14">
<p > <%if @repository.type.to_s=="Repository::Git"%> <p > <%if @repository.type.to_s=="Repository::Git"%>
<%= @repos_url%> <%= @repos_url%>
<%else %> <%else %>
<%=h @repository.url %> <%=h @repository.url %>
<% end %> <% end %>
</p> </p>
<p class="mb10 word_break"> <p class="mb10 word_break">
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo| (<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
@ -24,186 +25,50 @@
:class => 'repository' + (repo == @repository ? ' selected' : '') , :class => 'repository' + (repo == @repository ? ' selected' : '') ,
:class => "mb10 word_break c_orange"}.join('&nbsp|&nbsp').html_safe %>) :class => "mb10 word_break c_orange"}.join('&nbsp|&nbsp').html_safe %>)
</p> </p>
<p>项目代码请设置好正确的编码方式utf-8否则中文会出现乱码</p> <p>项目代码请设置好正确的编码方式utf-8否则中文会出现乱码</p>
<p>建立版本库文件夹,打开命令行执行如下:</p> <p>建立版本库文件夹,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git init</p>
<p>git add *</p>
<p>git commit -m "first commit"</p>
<p>git remote add origin
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master:master</p>
</div><!--repos_explain end-->
<div class="c_dark f14">
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git remote add origin http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master:master</p>
</div><!--repos_explain end-->
<div class="c_dark f14">
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git clone http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
<p>git push</p>
<p>git checkout -b branch_name</p>
<p>git push origin branch_name</p>
</div><!--repos_explain end-->
<div class="c_dark f14">
<p>从网上获取别人的开源版本库转交到trustie网站上打开命令行执行如下</p>
</div>
<div class="repos_explain">
<p>git remote add trustie
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
</p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u trustie master:master</p>
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
</div><!--repos_explain end-->
<div class="repos_files mt10">
<ul class="repos_files_ul">
<li class="w520">名称</li>
<li class="w128">大小</li>
<div class="cl"></div>
</ul>
<ul>
<li class="w520"><a href="javascript:void(0);" class=" c_blue f14 fl">+</a><a href="javascript:void(0);" class="pic_files fl mt3 ml5"></a><a href="javascript:void(0);" class=" fl c_dblue">com.aptana.core.io</a></li>
<li class="w128"></li>
<div class="cl"></div>
</ul>
<ul>
<li class="w520"><a href="javascript:void(0);" class="pic_text fl mt3 ml40"></a><a href="javascript:void(0);" class=" fl c_dblue">com.aptana.core.io</a></li>
<li class="w128 ">3.232 MB</li>
<div class="cl"></div>
</ul>
<ul>
<li class="w520"><a href="javascript:void(0);" class="pic_text02 fl mt3 ml40"></a><a href="javascript:void(0);" class=" fl c_dblue">com.aptana.core.io</a></li>
<li class="w128 ">3.232 MB</li>
<div class="cl"></div>
</ul>
<ul>
<li class="w520"><a href="javascript:void(0);" class=" c_blue f14 fl">-</a><a href="javascript:void(0);" class="pic_files fl mt3 ml10"></a><a href="javascript:void(0);" class=" fl c_dblue">com.aptana.core.io</a></li>
<li class="w128"></li>
<div class="cl"></div>
</ul>
<ul>
<li class="w520"></li>
<li class="w128"></li>
<div class="cl"></div>
</ul>
</div><!--repos_files end-->
<div class="c_dark f14">
<p>最近的修订版本</p>
</div>
<div class="repos_files">
<ul class="repos_files_ul">
<li class="w90">#</li>
<li class="w128">日期</li>
<li class="w128">作者</li>
<li class="w128">注释</li>
<div class="cl"></div>
</ul>
<ul class="repos_t_c">
<li class="w90"><a href="javascript:void(0);" class=" c_blue fl">87fdecda</a></li>
<li class="w128">2014-04-21 18:13</li>
<li class="w128">alan</li>
<li class="w128" style="text-align:left;">创新竞赛添加删除功能</li>
<div class="cl"></div>
</ul>
</div><!--repos_files end-->
<a href="javascript:void(0);" class="orange_u_btn ">查看修订</a>
<p class="fb c_dark mt10">查看如何提交代码:<a href="javascript:void(0);" class="c_blue">中文</a>&nbsp;|&nbsp;<a href="javascript:void(0);" class="c_blue ">English</a></p>
<div class="cl"></div>
</div><!--repository_con end-->
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<div class="project_r_h">
<h2 class="project_h2"><%=l(:project_module_repository)%></h2>
</div> </div>
<!--修订、统计--> <div class="repos_explain">
<div class="contextual" style="padding-right: 10px;"> <p>git init</p>
<%= render :partial => 'navigation' %> <p>git add *</p>
<p>git commit -m "first commit"</p>
<p>git remote add origin
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master:master</p>
</div><!--repos_explain end-->
<div class="c_dark f14">
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
</div> </div>
<h3>
<div style="font-size:15px;">
<%if @repository.type.to_s=="Repository::Git"%>
<%= @repos_url%>
<%else %>
<td>
<%=h @repository.url %>
</td>
<% end %>
</div>
<p style=" word-wrap: break-word; word-break: break-all">
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect {|repo|
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' : '')
}.join('&nbsp|&nbsp').html_safe %>)
</p>
<h3>项目代码请设置好正确的编码方式utf-8否则中文会出现乱码</h3>
<h3>建立版本库文件夹,打开命令行执行如下:</h3>
<div class="repos_explain">
<p>git init</p>
<p>git add *</p>
<p>git commit -m "first commit"</p>
<p>git remote add origin
<%= @repos_url%>
</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master:master</p>
</div>
<h3>已经有本地库,还没有配置远程地址,打开命令行执行如下:</h3>
<div class="repos_explain">
<p>git remote add origin <%= @repos_url%></p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master:master</p>
</div>
<h3>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</h3>
<div class="repos_explain">
<p>git clone <%= @repos_url%></p>
<p>git push</p>
<p>git checkout -b branch_name</p>
<p>git push origin branch_name</p>
</div>
</h3>
<h3>从网上获取别人的开源版本库转交到trustie网站上打开命令行执行如下</h3>
<div class="repos_explain"> <div class="repos_explain">
<p>git remote add trustie <p>git remote add origin http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
<%= @repos_url%> <p>git add .</p>
</p> <p>git commit -m "first commit"</p>
<p>git add .</p> <p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git commit -m "first commit"</p> <p>git push -u origin master:master</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p> </div><!--repos_explain end-->
<p>git push -u trustie master:master</p> <div class="c_dark f14">
<p><%= link_to "李海", user_path(646)%>提供</p> <p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git clone http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
<p>git push</p>
<p>git checkout -b branch_name</p>
<p>git push origin branch_name</p>
</div><!--repos_explain end-->
<div class="c_dark f14">
<p>从网上获取别人的开源版本库转交到trustie网站上打开命令行执行如下</p>
</div>
<div class="repos_explain">
<p>git remote add trustie
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
</p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u trustie master:master</p>
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
</div> </div>
<% if !@entries.nil? && authorize_for('repositories', 'browse') %> <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
@ -220,22 +85,24 @@
:locals => {:project => @project, :path => @path, :locals => {:project => @project, :path => @path,
:revisions => @changesets, :entry => nil }%> :revisions => @changesets, :entry => nil }%>
<% end %> <% end %>
<p> <p style="padding-top: 10px;">
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
sep = '' %> sep = '' %>
<% if @repository.supports_all_revisions? && @path.blank? %> <% if @repository.supports_all_revisions? && @path.blank? %>
<%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, <%= link_to l(:label_view_all_revisions), {:action => 'revisions', :id => @project,
:repository_id => @repository.identifier_param %> :repository_id => @repository.identifier_param},
:class => "orange_u_btn" %>
<% sep = '|' %> <% sep = '|' %>
<% end %> <% end %>
<% if @repository.supports_directory_revisions? && ( has_branches || !@path.blank? || !@rev.blank? ) %> <% if @repository.supports_directory_revisions? && ( has_branches || !@path.blank? || !@rev.blank? ) %>
<%= sep %> <%= sep %>
<%= link_to l(:label_view_revisions), <%= link_to l(:label_view_revisions),
:action => 'changes', {:action => 'changes',
:path => to_path_param(@path), :path => to_path_param(@path),
:id => @project, :id => @project,
:repository_id => @repository.identifier_param, :repository_id => @repository.identifier_param,
:rev => @rev %> :rev => @rev},
:class => "orange_u_btn" %>
<% end %> <% end %>
</p> </p>
<% if @repository.supports_all_revisions? %> <% if @repository.supports_all_revisions? %>
@ -244,30 +111,19 @@
:atom, params.merge( :atom, params.merge(
{:format => 'atom', :action => 'revisions', {:format => 'atom', :action => 'revisions',
:id => @project, :page => nil, :key => User.current.rss_key})) %> :id => @project, :page => nil, :key => User.current.rss_key})) %>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to 'Atom',
:url => {:action => 'revisions', :id => @project,
:repository_id => @repository.identifier_param,
:key => User.current.rss_key} %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
<!-- added by bai --> <!-- added by bai -->
<strong> <p class="fb c_dark mt10">查看如何提交代码:
<span style="color: #099;"> <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
<%= l(:label_how_commit_code) %> <%= link_to('English', en_usage_path, :class => "c_blue") %>
</span> <div class="cl"></div>
</strong>
&nbsp;
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "usage")%>
&nbsp;|&nbsp;
<%= link_to('English', en_usage_path, :class => "usage")%>
<!-- end -->
</div>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %> <%= stylesheet_link_tag "scm" %>
<% end %> <% end %>

@ -25,13 +25,21 @@ function submitSerch(content)
// //
// }) // })
//}) //})
function expand_tools_expand() function expand_tools_expand(content)
{ {
$("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); if (content=="invit"){
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); $("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
}
else
{
$("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
$("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
}
// 修改数字控制速度, slideUp(500)控制卷起速度 // 修改数字控制速度, slideUp(500)控制卷起速度
$("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
} }
// 描述显示更多信息 // 描述显示更多信息

@ -339,7 +339,8 @@ a:hover.st_add{ color:#ff8e15;}
padding-top: 2px; padding-top: 2px;
padding-bottom: 3px; padding-bottom: 3px;
} }
fieldset {border: 1px solid #e4e4e4; margin:0;}
legend {color: #484848;}
/* 新建问题 */ /* 新建问题 */
.label{ width:80px; text-align:right; font-size:14px; display:block; float:left;} .label{ width:80px; text-align:right; font-size:14px; display:block; float:left;}
.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;} .label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;}
@ -492,3 +493,9 @@ p.percent {
padding-top: 5px; padding-top: 5px;
font-size: 0.9em; font-size: 0.9em;
} }
/*导出*/
a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
p.other-formats { text-align: right; font-size:0.9em; color: #666; }
.other-formats span + span:before { content: "| "; }

Loading…
Cancel
Save