Commit 7069fac317e503438065243ccb66e1878875d406
1 parent
aee110e2
Exists in
master
and in
4 other branches
Add custom sing-in text & google analytics
Showing
6 changed files
with
19 additions
and
3 deletions
Show diff stats
app/views/devise/sessions/new.html.haml
@@ -26,3 +26,7 @@ | @@ -26,3 +26,7 @@ | ||
26 | - resource_class.omniauth_providers.each do |provider| | 26 | - resource_class.omniauth_providers.each do |provider| |
27 | %span | 27 | %span |
28 | = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) | 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,7 +19,7 @@ | ||
19 | %ul.well-list | 19 | %ul.well-list |
20 | %li | 20 | %li |
21 | Email your | 21 | Email your |
22 | - = mail_to Gitlab.config.gitlab.support_email, "support contact" | 22 | + = mail_to gitlab_config.support_email, "support contact" |
23 | %li | 23 | %li |
24 | Use the | 24 | Use the |
25 | = link_to "search bar", '#', onclick: "$('#search').focus();" | 25 | = link_to "search bar", '#', onclick: "$('#search').focus();" |
@@ -0,0 +1,10 @@ | @@ -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,6 +9,8 @@ | ||
9 | = csrf_meta_tags | 9 | = csrf_meta_tags |
10 | = include_gon | 10 | = include_gon |
11 | 11 | ||
12 | + = render 'layouts/google_analytics' if gitlab_config.has_key?('google_analytics_id') | ||
13 | + | ||
12 | -# Atom feed | 14 | -# Atom feed |
13 | - if current_user | 15 | - if current_user |
14 | - if controller_name == 'projects' && action_name == 'index' | 16 | - if controller_name == 'projects' && action_name == 'index' |
app/views/profiles/account.html.haml
@@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
78 | .input | 78 | .input |
79 | = f.submit 'Save username', class: "btn btn-save" | 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 | %fieldset.remove-account | 82 | %fieldset.remove-account |
83 | %legend | 83 | %legend |
84 | Remove account | 84 | Remove account |
app/views/shared/_clone_panel.html.haml
1 | .input-prepend.input-append.project_clone_holder | 1 | .input-prepend.input-append.project_clone_holder |
2 | %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH | 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 | = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span7", readonly: true | 4 | = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span7", readonly: true |
5 | %span.add-on | 5 | %span.add-on |
6 | - if @project.public | 6 | - if @project.public |