SUZUKI Miho
null+****@clear*****
Fri Sep 28 14:21:19 JST 2012
SUZUKI Miho 2012-09-28 14:21:19 +0900 (Fri, 28 Sep 2012) New Revision: d6faf0fdcdad416564336fb6563b17c8f51f267e https://github.com/logaling/logaling-server/commit/d6faf0fdcdad416564336fb6563b17c8f51f267e Merged 92895a5: Merge pull request #21 from logaling/enable-copy-user-glossary Log: Add parameter for copying user glossary Modified files: app/controllers/user_glossaries_controller.rb app/views/dashboard/show.html.haml Modified: app/controllers/user_glossaries_controller.rb (+3 -0) =================================================================== --- app/controllers/user_glossaries_controller.rb 2012-09-28 14:14:06 +0900 (e6744bb) +++ app/controllers/user_glossaries_controller.rb 2012-09-28 14:21:19 +0900 (49bd1ea) @@ -14,6 +14,9 @@ class UserGlossariesController < ApplicationController # GET /user_glossaries/new def new @user_glossary = UserGlossary.new + if params[:original_user_glossary_id].present? + @user_glossary.original_user_glossary_id = params[:original_user_glossary_id] + end end # POST /user_glossaries Modified: app/views/dashboard/show.html.haml (+1 -1) =================================================================== --- app/views/dashboard/show.html.haml 2012-09-28 14:14:06 +0900 (27db729) +++ app/views/dashboard/show.html.haml 2012-09-28 14:21:19 +0900 (1a1bdf7) @@ -20,7 +20,7 @@ %label{ :for => "commit_#{user_glossary.id}" } %i{ :class => 'icon-star' } = f.submit '', :class => 'hidden', :id => "commit_#{user_glossary.id}" - = link_to raw("<i class=icon-file></i>"), new_user_glossary_path(current_user), :class => 'btn btn-mini' + = link_to raw("<i class=icon-file></i>"), new_user_glossary_path(current_user)+"?original_user_glossary_id=#{user_glossary.id}", :class => 'btn btn-mini' = link_to raw("<i class=icon-trash></i>"), user_glossary_path(current_user, user_glossary), method: :delete, :class => 'btn btn-mini' %h2 -------------- next part -------------- An HTML attachment was scrubbed... 下載