Project

General

Profile

Feature #3058 » show-notes-only-v3.diff

patch (2016-02-16) - Go MAEDA, 2016-02-16 05:18

View differences:

app/helpers/issues_helper.rb (working copy)
end
end
end
def issue_history_tabs
tabs = [
{:name => 'all', :action => :edit_project, :partial => 'issues/history/all', :label => :label_issue_history_all},
{:name => 'notes', :action => :index, :partial => 'issues/history/notes', :label => :label_issue_history_notes}
]
end
end
app/views/issues/history/_all.html.erb (working copy)
<script>
$('#history #tab-all').on('click', function() {
$('.journal:not(.has-notes), .journal>.details').slideDown('fast');
});
</script>
app/views/issues/history/_notes.html.erb (working copy)
<script>
$('#history #tab-notes').on('click', function() {
$('.journal:not(.has-notes), .journal>.details').slideUp('fast');
});
</script>
app/views/issues/show.html.erb (working copy)
<% if @journals.present? %>
<div id="history">
<h3><%=l(:label_history)%></h3>
<%= render_tabs issue_history_tabs %>
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
</div>
<% end %>
config/locales/en.yml (working copy)
label_api: API
label_field_format_enumeration: Key/value list
label_default_values_for_new_users: Default values for new users
label_issue_history_all: All
label_issue_history_notes: Notes
button_login: Login
button_submit: Submit
config/routes.rb (working copy)
match '/issues/context_menu', :to => 'context_menus#issues', :as => 'issues_context_menu', :via => [:get, :post]
match '/issues/changes', :to => 'journals#index', :as => 'issue_changes', :via => :get
match '/issues/:id/quoted', :to => 'journals#new', :id => /\d+/, :via => :post, :as => 'quoted_issue'
get '/issues/:id/:tab', :to => 'issues#show'
resources :journals, :only => [:edit, :update] do
member do
......
end
end
end
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do
member do
(10-10/28)