diff --git a/app/views/hooks/redmine_omniauth_google/_view_account_login_bottom.html.erb b/app/views/hooks/redmine_omniauth_google/_view_account_login_bottom.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..eede9e0c89ac5f17abdfa04151841cef26af704b --- /dev/null +++ b/app/views/hooks/redmine_omniauth_google/_view_account_login_bottom.html.erb @@ -0,0 +1 @@ +<p><%= "render with google" %></p> \ No newline at end of file diff --git a/init.rb b/init.rb index 23c537b461e41a04ddbb277daabac119ba7faf42..470481f1c8b8be00cb128a404687456e2073a60b 100644 --- a/init.rb +++ b/init.rb @@ -1,8 +1,11 @@ +require 'redmine' +require_dependency 'redmine_omniauth_google/hooks/view_account_login_bottom_hook' + Redmine::Plugin.register :redmine_omniauth_google do name 'Redmine Omniauth Google plugin' - author 'Author name' - description 'This is a plugin for Redmine' + author 'Dmitry Kovalenok' + description 'This is a plugin for Redmine registration through google' version '0.0.1' - url 'http://example.com/path/to/plugin' - author_url 'http://example.com/about' + url 'http://gitlab.tsdv.net/redmine_omniauth_google' + author_url 'https://tsdv.net/redmine/users/105' end diff --git a/lib/redmine_omniauth_google/hooks/view_account_login_bottom_hook.rb b/lib/redmine_omniauth_google/hooks/view_account_login_bottom_hook.rb new file mode 100644 index 0000000000000000000000000000000000000000..975f808d214af8127910374f9dfdef900b9c6dbf --- /dev/null +++ b/lib/redmine_omniauth_google/hooks/view_account_login_bottom_hook.rb @@ -0,0 +1,14 @@ +module RedmineOmniauthGoogle + module Hooks + class ViewAccountLoginBottomHook < Redmine::Hook::ViewListener + # def view_account_login_bottom context = {} + # context[:controller].send(:render_to_string, { + # partial: "hooks/redmine_omniauth_google/view_account_login_bottom", + # locals: context + # }) + # end + render_on :view_account_login_bottom, + partial: "hooks/redmine_omniauth_google/view_account_login_bottom" + end + end +end \ No newline at end of file