- <%= l(:label_main_teacher)%> : <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher), :class => 'c_dblue') %> @@ -113,14 +119,14 @@ <% end%>
'+$('a',div).filter(':first').html()+' 写到:'; + var str = '
'+$("input[nhname='nh_content_val']",div).val()+'
'+$('a',div).filter(':first').html()+' 写到:'; return str; } nh_init_board(params); diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb index f6b41b53f..525869901 100644 --- a/app/views/boards/_form_project.html.erb +++ b/app/views/boards/_form_project.html.erb @@ -47,6 +47,7 @@
'+$("input[nhname='nh_content_val']",div).val()+'
'+$('a',div).filter(':first').html()+' 写到:'; + var str = '
'+$("input[nhname='nh_content_val']",div).val()+'
'+$('a',div).filter(':first').html()+' 写到:'; return str; } nh_init_board(params); From 3c515dd07727e075baddf38eff08ef3e8a9410a1 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 12 Jun 2015 10:52:15 +0800 Subject: [PATCH 038/105] ... --- app/views/boards/show.html.erb | 7 +++++-- app/views/courses/_courses_jours.html.erb | 7 +++++-- app/views/projects/_project_jours.html.erb | 7 +++++-- app/views/users/_user_jours.html.erb | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index d7a02e326..196e7f097 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -185,8 +185,11 @@ function nh_init_board(params){ if(params.quote_input!=undefined)params.quote_input.empty(); }else{ if(params.type=='reply'){ - params.jumphref.attr('href','#'+params.form.attr('id')); - params.jumphref[0].click(); + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); + //params.jumphref.attr('href','#'+params.form.attr('id')); + //params.jumphref[0].click(); }else params.inputsubject.focus(); } }); diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 07d065901..a097a2286 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -168,8 +168,11 @@ params.cancel_btn.click(); setTimeout(function(){ if(!params.div_form.is(':hidden')){ - $("#nhjump").attr('href','#'+params.div_form.attr('id')); - $("#nhjump")[0].click(); + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); +// $("#nhjump").attr('href','#'+params.div_form.attr('id')); +// $("#nhjump")[0].click(); } },300); params.textarea.data('init',1); diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb index e7aebac43..d530a7199 100644 --- a/app/views/projects/_project_jours.html.erb +++ b/app/views/projects/_project_jours.html.erb @@ -162,8 +162,11 @@ params.cancel_btn.click(); setTimeout(function(){ if(!params.div_form.is(':hidden')){ - $("#nhjump").attr('href','#'+params.div_form.attr('id')); - $("#nhjump")[0].click(); + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); +// $("#nhjump").attr('href','#'+params.div_form.attr('id')); +// $("#nhjump")[0].click(); } },300); params.textarea.data('init',1); diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb index 061632194..56b9a883b 100644 --- a/app/views/users/_user_jours.html.erb +++ b/app/views/users/_user_jours.html.erb @@ -190,8 +190,11 @@ params.cancel_btn.click(); setTimeout(function(){ if(!params.div_form.is(':hidden')){ - $("#nhjump").attr('href','#'+params.div_form.attr('id')); - $("#nhjump")[0].click(); + params.textarea.show(); + params.textarea.focus(); + params.textarea.hide(); +// $("#nhjump").attr('href','#'+params.div_form.attr('id')); +// $("#nhjump")[0].click(); } },300); params.textarea.data('init',1); From dbb6c9f54cab48b30ebeedd1a487909777b94bf4 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 12 Jun 2015 11:21:49 +0800 Subject: [PATCH 039/105] ... --- public/assets/kindeditor/kindeditor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 74228d3ea..5ebe96a32 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -5620,7 +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.exec('insertimage', url, 'image','','','1','left'); + self.insertHtml('
'+$("input[nhname='nh_content_val']",div).val()+'
<%= l :label_activity_time %> : <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> - <%= link_to_attachments_course(e) if e.is_a?(News) %> + <%= link_to_attachments_course(e) if e.class.to_s == "News" %>
-
<%= l(:label_course_news) %>
-
<% @course_news.each do |course_new|%>
-
@@ -41,7 +40,6 @@
-
<%= l(:label_homework_overview) %>
-
<% unless @bids.first.nil?%>
<% @bids.each do |bid| %>
@@ -76,7 +74,6 @@
-
@@ -137,7 +133,6 @@
-
<%= l(:label_course_attendingcontestwork_download) %>
-
<% @attachments.each do |attachment|%>
-
@@ -174,7 +169,6 @@
-
<%= l(:label_issue_tracking) %>
-
<% @issues.each do |issue|%>
-
@@ -203,7 +197,6 @@
-
<%= l(:project_moule_boards_show) %>
-
<% @project_messages.each do |project_message|%>
-
@@ -236,7 +229,6 @@
-
<%= l(:label_wiki) %>
-
<% @wiki_contents.each do |wikicontent|%>
-
@@ -268,7 +260,6 @@
-
<%= l(:label_project_news) %>
-
<% @project_news.each do |project_new|%>
-
@@ -298,7 +289,6 @@
-
<%= l(:label_project_mail_feedback) %>
-
<% @project_journal_messages.each do |project_journal_message|%>
@@ -336,7 +326,6 @@
-
<%= l(:label_user_message) %>
-
<% @user_journal_messages.each do |user_journal_message|%>
@@ -395,7 +384,6 @@
-
<%= l(:label_user_message_forum) %>
-
<% @memos.each do |memo|%>
diff --git a/app/views/mailer/send_for_user_activities.text.erb b/app/views/mailer/send_for_user_activities.text.erb
index f09dcb299..c46e96f03 100644
--- a/app/views/mailer/send_for_user_activities.text.erb
+++ b/app/views/mailer/send_for_user_activities.text.erb
@@ -15,13 +15,13 @@
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value)%>
]
- <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
+ <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
%>
<%= l(:label_project_notice) %>
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value)
-
-
+
+
%> <%= format_time(course_new.created_on) %>
<% end %>
@@ -35,7 +35,7 @@
[
<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course, :token => @token.value)
-
+
%>
]
@@ -44,8 +44,8 @@
<%= l(:label_course_homework) %>
<%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value)
-
-
+
+
%>
<%= format_time(bid.created_at) %>
@@ -66,17 +66,17 @@
[
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value)
-
+
%>
]
- <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
+ <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
%>
<%= l(:label_send_course_journals_for_messages) %>
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value)
-
-
+
+
%>
<%= format_time(course_journal_message.created_on) %>
@@ -97,7 +97,7 @@
[
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course, :token => @token.value)
-
+
%>
]
@@ -106,8 +106,8 @@
<%= l(:label_send_course_messages) %>
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value)
-
-
+
+
%>
<%= format_time(course_message.created_on) %>
@@ -126,7 +126,7 @@
▪[
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value)
-
+
%>
]
@@ -135,8 +135,8 @@
<%= l(:label_course_file_upload) %>
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value)
-
-
+
+
%>
<%= format_time(attachment.created_on) %>
@@ -158,7 +158,7 @@
[
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value)
-
+
%>
]
@@ -167,8 +167,8 @@
<%= l(:label_project_issue) %>
<%= link_to truncate(issue. subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value)
-
-
+
+
%>
<%= format_time(issue.created_on) %>
<% end %>
@@ -185,7 +185,7 @@
▪[
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value)
-
+
%>
]
@@ -194,8 +194,8 @@
<%= l(:label_send_course_messages) %>
<%= link_to truncate(project_message. subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
-
-
+
+
%>
<%= format_time(project_message.created_on) %>
<% end %>
@@ -277,13 +277,13 @@
▪
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)
-
+
%>
<%= l(:label_show_your_message) %>
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value)
-
-
+
+
%>
<%= format_time(user_journal_message.created_on) %>
From 46da84cd819fe4fbd39b8bf0f14da7c27dfa8c63 Mon Sep 17 00:00:00 2001
From: yutao <283765470@qq.com>
Date: Fri, 12 Jun 2015 15:56:28 +0800
Subject: [PATCH 044/105] ...
---
app/views/courses/_courses_jours.html.erb | 4 ++--
app/views/projects/_project_jours.html.erb | 2 +-
app/views/users/_user_jours.html.erb | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb
index a097a2286..e3eba9151 100644
--- a/app/views/courses/_courses_jours.html.erb
+++ b/app/views/courses/_courses_jours.html.erb
@@ -155,8 +155,8 @@
params.div_form = $(">.respond-form",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
- params.contentmsg = $("p[nhname='contentmsg']",params.div_form),
- params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
+ params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
+ params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb
index d530a7199..5692afcf5 100644
--- a/app/views/projects/_project_jours.html.erb
+++ b/app/views/projects/_project_jours.html.erb
@@ -149,7 +149,7 @@
params.div_form = $(">.respond-form",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
- params.contentmsg = $("p[nhname='contentmsg']",params.div_form),
+ params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
diff --git a/app/views/users/_user_jours.html.erb b/app/views/users/_user_jours.html.erb
index 56b9a883b..a2f6f8cb4 100644
--- a/app/views/users/_user_jours.html.erb
+++ b/app/views/users/_user_jours.html.erb
@@ -177,8 +177,8 @@
params.div_form = $(">.respond-form",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
- params.contentmsg = $("p[nhname='contentmsg']",params.div_form),
- params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
+ params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
+ params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
From 6d8f0e728d49cd99aa8179ea0eae89cc80a4708d Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 12 Jun 2015 16:26:24 +0800
Subject: [PATCH 045/105] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=20=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E3=80=81=E9=80=9A=E7=9F=A5=E6=A8=A1=E5=9D=97=EF=BC=8C=E6=96=B0?=
=?UTF-8?q?=E7=89=88=E7=BC=96=E8=BE=91=E5=99=A8=E7=9B=B8=E5=85=B3BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../homework_common/_homework_common_form.html.erb | 14 ++++++++------
app/views/news/_course_form.html.erb | 8 ++++++--
.../kindeditor/themes/default/default.css | 1 +
.../assets/kindeditor/themes/default/default.css | 1 +
public/stylesheets/public.css | 1 +
5 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/app/views/homework_common/_homework_common_form.html.erb b/app/views/homework_common/_homework_common_form.html.erb
index e3ef0d237..28aa490de 100644
--- a/app/views/homework_common/_homework_common_form.html.erb
+++ b/app/views/homework_common/_homework_common_form.html.erb
@@ -11,12 +11,14 @@
-
- <% if edit_mode %>
- <%= f.kindeditor :description,:width=>'83%',:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
- <% else %>
- <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
- <%= f.kindeditor :description,:width=>'83%',:editor_id => 'homework_description_editor' %>
- <% end %>
+ + <% if edit_mode %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> + <% else %> + <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> + <% end %> +
-
diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb
index 32c8e368e..1769c98f3 100644
--- a/app/views/news/_course_form.html.erb
+++ b/app/views/news/_course_form.html.erb
@@ -8,11 +8,15 @@
<% if is_new %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
- <%= f.kindeditor :description,:width=>'91%',:editor_id=>'news_description_editor' %>
+ + <%= f.kindeditor :description,:editor_id=>'news_description_editor' %> +<% else %> - <%= f.kindeditor :description,:width=>'91%',:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %> ++ <%= f.kindeditor :description,:editor_id=>'news_description_editor',:owner_id => @news.id,:owner_type => OwnerTypeHelper::NEWS %> +<% end %> diff --git a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css index 428b6c8b5..0d322283a 100644 --- a/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css +++ b/lib/rails_kindeditor/vendor/assets/javascripts/kindeditor/themes/default/default.css @@ -421,6 +421,7 @@ overflow: hidden; margin: 0; padding: 0; + max-width: 100%; } /* toolbar */ .ke-toolbar { diff --git a/public/assets/kindeditor/themes/default/default.css b/public/assets/kindeditor/themes/default/default.css index 5de213f37..c5a84c186 100644 --- a/public/assets/kindeditor/themes/default/default.css +++ b/public/assets/kindeditor/themes/default/default.css @@ -432,6 +432,7 @@ } /* container */ .ke-container { + max-width: 100%; display: block; border: 1px solid #CCCCCC; background-color: #FFF; diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 4bfc1ef99..0ed497127 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -440,3 +440,4 @@ img{max-width: 100%;} .attachments {clear: both;} .is_public_checkbox{margin-left: 15px;margin-right: 10px;} .author_name{color: #3ca5c6 !important;} +.ke-container-default{max-width: 100%;} From e138292f2a9a01762a5b3b0647645a270fe0eaae Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 12 Jun 2015 16:31:29 +0800 Subject: [PATCH 046/105] ... --- app/views/courses/_courses_jours.html.erb | 6 ++++-- app/views/courses/_history.html.erb | 3 ++- app/views/projects/_history.html.erb | 3 ++- app/views/projects/_project_jours.html.erb | 6 ++++-- app/views/users/_history.html.erb | 3 ++- app/views/users/_user_jours.html.erb | 6 ++++-- app/views/words/_journal_reply_items.html.erb | 3 ++- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index e3eba9151..28dfbe786 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -49,6 +49,7 @@ -<%= error_messages_for 'bid' %> - -
<%= l(:label_bids_form_contest_new_description) %>
-<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %>
- -<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>
- -<%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %>
- -- <%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> - - -
- -<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>
From 94877bb353d2cc8f818d7378c170f867c0834baa Mon Sep 17 00:00:00 2001 From: huangDate: Fri, 12 Jun 2015 16:48:43 +0800 Subject: [PATCH 052/105] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_revisions.html.erb | 97 +++++++++--------- app/views/repositories/show.html.erb | 108 +++++++++++---------- 2 files changed, 103 insertions(+), 102 deletions(-) diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb index a0a960b6c..891952559 100644 --- a/app/views/repositories/_revisions.html.erb +++ b/app/views/repositories/_revisions.html.erb @@ -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 %> - -
-- - -<% show_diff = revisions.size > 1 %> -<% line_num = 1 %> -<% revisions.each do |changeset| %> -# -- - <%= l(:label_date) %> -<%= l(:field_author) %> -<%= l(:field_comments) %> --<% 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 %> - -<% line_num += 1 %> -<% end %> - -<%= 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) %> -<%= 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) %> -<%= format_time(changeset.committed_on) %> -<%= h truncate(changeset.author.to_s, :length => 30) %> -<%= textilizable(truncate_at_line_break(changeset.comments)) %> -+ {:controller => 'repositories', :action => 'diff', :id => project, + :repository_id => @repository.identifier_param, :path => to_path_param(path)}, + :method => :get + ) do %> +
+
++ + + <% show_diff = revisions.size > 1 %> + <% line_num = 1 %> + <% revisions.each do |changeset| %> +# ++ + <%= l(:label_date) %> +<%= l(:field_author) %> +<%= l(:field_comments) %> ++ <% 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 %> + + <% line_num += 1 %> + <% end %> + +<%= 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) %> +<%= 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) %> +<%= format_time(changeset.committed_on) %> +<%= h truncate(changeset.author.to_s, :length => 30) %> +<%= textilizable(truncate_at_line_break(changeset.comments)) %> +<%= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %> -
- + <% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 1cb5942bf..a128f917a 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -5,9 +5,8 @@<%= render :partial => 'breadcrumbs', - :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> + :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> <%= render :partial => 'navigation' %> -@@ -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 %>)
-
@@ -298,7 +289,6 @@
-
@@ -268,7 +260,6 @@
-
@@ -236,7 +229,6 @@
-
@@ -203,7 +197,6 @@
-
@@ -174,7 +169,6 @@
-
<%= l(:view_course_journals_for_messages) %>
-
<% @course_journal_messages.each do |course_journal_message|%>
@@ -109,7 +106,6 @@
-
<%= l(:view_borad_course) %>
-
<% @course_messages.each do |course_message|%>
-
@@ -137,7 +133,6 @@
项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。
通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。 - 如果是首次提交代码,执行如下命令:
+ 如果是首次提交代码,执行如下命令:git init
@@ -53,7 +52,7 @@git push -u origin branch:branch
已经有本地库,还没有配置远程地址,打开命令行执行如下:
git push -u origin branch:branch
已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:
git push origin branch_name
从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:
李海提供
- <%= l(:label_latest_revision_plural) %> -
- <%= render :partial => 'revisions', - :locals => {:project => @project, :path => @path, - :revisions => @changesets, :entry => nil} %> + +<% if authorize_for('repositories', 'revisions') %> + <%# if @changesets && !@changesets.empty? %> ++ <%= l(:label_latest_revision_plural) %> +
+ <%= render :partial => 'revisions', + :locals => {:project => @project, :path => @path, + :revisions => @changesets, :entry => nil} %> + <%# end %> + ++ <% 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 %> -
- <% 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 %> -
- <% 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 %> + + <% 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 %> - -查看如何提交代码: - <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> - <%= link_to('English', en_usage_path, :class => "c_blue") %> + +
查看如何提交代码: + <%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %> + <%= link_to('English', en_usage_path, :class => "c_blue") %> -
+ <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> From 482df88d70d3ff1f6fba15f17cc6d8b2fcce2829 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Fri, 12 Jun 2015 16:52:49 +0800 Subject: [PATCH 053/105] ... --- app/views/projects/_history.html.erb | 3 ++- app/views/users/_history.html.erb | 3 ++- app/views/words/_journal_reply_items.html.erb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index d85906a2c..54dda7b28 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -9,7 +9,8 @@ <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> <%= format_time(journal.created_on) %> -<%= textilizable journal.notes%>
+ +<%=journal.notes.html_safe%>
<%= textilizable journal.notes%>
+ +<%=journal.notes.html_safe%>
- <%= reply.notes %> + <%= reply.notes.html_safe %>
<%= format_time reply.created_on %> From 2a2b93c97df190329af0e710ab0f3dea2d59d304 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 12 Jun 2015 16:58:43 +0800 Subject: [PATCH 054/105] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=A4=9A=E8=A1=8C=E4=B8=BB=E8=A7=82=E7=9A=84?= =?UTF-8?q?=E7=AD=94=E6=A1=88=E6=9C=89html=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 73650a782..a222314ab 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -464,7 +464,7 @@ class PollController < ApplicationController sheet1[count_row + 1,0] = l(:label_poll_subtotal) sheet1[count_row + 2,0] = l(:label_poll_proportion) poll_question.poll_answers.each_with_index do |poll_answer,i| - sheet1[count_row, i + 1] = poll_answer.answer_text + sheet1[count_row, i + 1] = poll_answer.answer_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") sheet1[count_row + 1, i + 1] = poll_answer.poll_votes.count sheet1[count_row + 2, i + 1] = statistics_result_percentage(poll_answer.poll_votes.count, total_answer(poll_question.id)).to_s + "%" end @@ -477,7 +477,7 @@ class PollController < ApplicationController sheet1[count_row,1] = poll_question.question_title count_row += 1 poll_question.poll_votes.each do |poll_vote| - sheet1[count_row,0] = poll_vote.vote_text + sheet1[count_row,0] = poll_vote.vote_text.gsub(/<\/?.*?>/,"").gsub(/ /," ") count_row += 1 end count_row += 1 From cd7bb85f2f777807576a1e6d4035080625aad22e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 12 Jun 2015 17:25:39 +0800 Subject: [PATCH 055/105] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A4=9A=E4=BA=86=E4=B8=80=E4=B8=AAc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/stores/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb index 84116a561..6fab364b5 100644 --- a/app/views/stores/index.html.erb +++ b/app/views/stores/index.html.erb @@ -35,7 +35,7 @@ <%= c1.downloads %>