diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 9d734db37..b522a09d6 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -83,6 +83,10 @@ class IssuesController < ApplicationController :limit => @limit) @issue_count_by_group = @query.issue_count_by_group + + + + respond_to do |format| format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young format.api { diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 91da700a1..14814ed32 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -37,14 +37,39 @@ class MyController < ApplicationController }.freeze def index + page render :action => 'page' - end + end # Show user's page def page @user = User.current + @Issues= Issue.visible.open. + where(:assigned_to_id => ([User.current.id] + User.current.group_ids)) + @limit = 10 + @feedback_count = @Issues.count + @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] + @offset ||= @feedback_pages.offset + @curse_attachments = @Issues[@offset, @limit] + + @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT + end + + def page2 + @limit = 10 + @user = User.current + @Issues= Issue.visible.open. + where(:assigned_to_id => ([User.current.id] + User.current.group_ids)) + @feedback_count = @Issues.count + @feedback_pages = Paginator.new @feedback_count, @limit, params['page'] + @offset ||= @feedback_pages.offset + @curse_attachments = @Issues[@offset, @limit] + @state = false @blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT + respond_to do |format| + format.js + end end # Edit user's account diff --git a/app/views/attachments/file.html.erb b/app/views/attachments/file.html.erb index 57393b81e..c85cbe32a 100644 --- a/app/views/attachments/file.html.erb +++ b/app/views/attachments/file.html.erb @@ -4,7 +4,13 @@
<%= h("#{@attachment.description} - ") unless @attachment.description.blank? %>
<%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%> - (<%= number_to_human_size @attachment.filesize %>)
+ (<%= number_to_human_size @attachment.filesize %>)    + <%= link = link_to(l(:button_add), {:controller => 'code_review', + :action => 'assign', :action_type => 'attachment', + :id=>@attachment.project, + :change_id => '', :attachment_id => @attachment.id, + }, :class => 'icon icon-add') %> + diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index f7c753b45..463b2b621 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -26,9 +26,9 @@<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT %>
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
-<%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 41c059603..bfecb5304 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -30,7 +30,7 @@ <%#= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> --> <% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %> -<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}") %><%= calendar_for('bid_deadline')%> +
<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}",:readonly => "readonly") %><%= calendar_for('bid_deadline')%>
<%= f.select :is_evaluation, is_evaluation_option %>
diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 043fe1183..f865235ae 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -3,7 +3,8 @@ <% attachmenttypes = @project.attachmenttypes %> <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %> <% edit_allowed = User.current.allowed_to?(:manage_files, @project) %> -<%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description.to_s, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %> | + -<%= number_to_human_size(file.filesize) %> | -+ | + -<%= file.show_suffix_type %> | -+ | + -<%= file.downloads %> | + -+ | @@ -83,7 +84,7 @@
<%= l(:label_homeworks_form_new_description) %>
+ <%# if @memo.safe_attribute? 'sticky' %> + <%#= f.check_box :sticky %><%= f.text_field :content, :required => true, :size => 60, :style => "width:150px;" %>
<%= hidden_field_tag 'subject', ||=@memo.subject %> \ No newline at end of file diff --git a/app/views/my/blocks/_assiagn_issue.html.erb b/app/views/my/blocks/_assiagn_issue.html.erb new file mode 100644 index 000000000..6e7df84fd --- /dev/null +++ b/app/views/my/blocks/_assiagn_issue.html.erb @@ -0,0 +1,26 @@ +<% assigned_issues = issuesassignedtome_items %> +<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %> +<% if assigned_issues.length > 0 %> + + +
<%= link_to l(:label_issue_view_all), :controller => 'issues', + :action => 'index', + :set_filter => 1, + :assigned_to_id => 'me', + :sort => 'priority:desc,updated_on:desc' %>
+<% end %> +<% content_for :header_tags do %> +<%= auto_discovery_link_tag(:atom, + {:controller => 'issues', :action => 'index', :set_filter => 1, + :assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key}, + {:title => l(:label_assigned_to_me_issues)}) %> + +<% end %> \ No newline at end of file diff --git a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb index 02d8c9aa6..0b20dd4e5 100644 --- a/app/views/my/blocks/_issuesassignedtome.html.erb +++ b/app/views/my/blocks/_issuesassignedtome.html.erb @@ -1,18 +1,4 @@<%= link_to l(:label_issue_view_all), :controller => 'issues', - :action => 'index', - :set_filter => 1, - :assigned_to_id => 'me', - :sort => 'priority:desc,updated_on:desc' %>
-<% end %> - -<% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, - {:controller => 'issues', :action => 'index', :set_filter => 1, - :assigned_to_id => 'me', :format => 'atom', :key => User.current.rss_key}, - {:title => l(:label_assigned_to_me_issues)}) %> -<% end %> +