Commit 7069fac317e503438065243ccb66e1878875d406

Authored by Dmitriy Zaporozhets
1 parent aee110e2

Add custom sing-in text & google analytics

app/views/devise/sessions/new.html.haml
... ... @@ -26,3 +26,7 @@
26 26 - resource_class.omniauth_providers.each do |provider|
27 27 %span
28 28 = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)
  29 +
  30 + - if extra_config.has_key?('sign_in_text')
  31 + %hr
  32 + = markdown(extra_config.sign_in_text)
... ...
app/views/help/index.html.haml
... ... @@ -19,7 +19,7 @@
19 19 %ul.well-list
20 20 %li
21 21 Email your
22   - = mail_to Gitlab.config.gitlab.support_email, "support contact"
  22 + = mail_to gitlab_config.support_email, "support contact"
23 23 %li
24 24 Use the
25 25 = link_to "search bar", '#', onclick: "$('#search').focus();"
... ...
app/views/layouts/_google_analytics.html.haml 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +:javascript
  2 + var _gaq = _gaq || [];
  3 + _gaq.push(['_setAccount', '#{gitlab_config.google_analytics_id}']);
  4 + _gaq.push(['_trackPageview']);
  5 +
  6 + (function() {
  7 + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  8 + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  9 + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  10 + })();
... ...
app/views/layouts/_head.html.haml
... ... @@ -9,6 +9,8 @@
9 9 = csrf_meta_tags
10 10 = include_gon
11 11  
  12 + = render 'layouts/google_analytics' if gitlab_config.has_key?('google_analytics_id')
  13 +
12 14 -# Atom feed
13 15 - if current_user
14 16 - if controller_name == 'projects' && action_name == 'index'
... ...
app/views/profiles/account.html.haml
... ... @@ -78,7 +78,7 @@
78 78 .input
79 79 = f.submit 'Save username', class: "btn btn-save"
80 80  
81   -- if Gitlab.config.gitlab.signup_enabled
  81 +- if gitlab_config.signup_enabled
82 82 %fieldset.remove-account
83 83 %legend
84 84 Remove account
... ...
app/views/shared/_clone_panel.html.haml
1 1 .input-prepend.input-append.project_clone_holder
2 2 %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
3   - %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.gitlab.protocol.upcase
  3 + %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
4 4 = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span7", readonly: true
5 5 %span.add-on
6 6 - if @project.public
... ...