diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb
index 4126a4279..5e22807a7 100644
--- a/app/controllers/admin/pages_controller.rb
+++ b/app/controllers/admin/pages_controller.rb
@@ -4,10 +4,17 @@ module Admin
def index
@pages = Page.all
+ @code_of_conduct = Page.find_by(slug: "code-of-conduct")
+ @privacy = Page.find_by(slug: "privacy")
+ @terms = Page.find_by(slug: "terms")
end
def new
- @page = Page.new
+ if params[:slug]
+ prepopulate_new_form params[:slug]
+ else
+ @page = Page.new
+ end
end
def edit
@@ -39,5 +46,51 @@ module Admin
social_image]
params.require(:page).permit(allowed_params)
end
+
+ def prepopulate_new_form(slug)
+ if slug == "code-of-conduct"
+ html = view_context.render partial: "pages/coc_text",
+ locals: {
+ community_name: view_context.community_name,
+ community_qualified_name: view_context.community_qualified_name,
+ email_link: view_context.email_link
+ }
+ @page = Page.new(
+ slug: params[:slug],
+ body_html: html,
+ title: "Code of Conduct",
+ description: "A page that describes how to behave on this platform",
+ is_top_level_path: true,
+ )
+ elsif slug == "privacy"
+ html = view_context.render partial: "pages/privacy_text",
+ locals: {
+ community_name: view_context.community_name,
+ email_link: view_context.email_link
+ }
+ @page = Page.new(
+ slug: params[:slug],
+ body_html: html,
+ title: "Privacy Policy",
+ description: "A page that describes the privacy policy",
+ is_top_level_path: true,
+ )
+ elsif slug == "terms"
+ html = view_context.render partial: "pages/terms_text",
+ locals: {
+ community_name: view_context.community_name,
+ email_link: view_context.email_link
+ }
+ @page = Page.new(
+ slug: params[:slug],
+ body_html: html,
+ title: "Terms of Use",
+ description: "A page that describes the terms of use for the application",
+ is_top_level_path: true,
+ )
+ else
+ @page = Page.new
+ end
+ end
end
end
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index f92bf2fc9..d1658cab7 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -28,6 +28,12 @@ class PagesController < ApplicationController
set_surrogate_key_header "bounty_page"
end
+ def code_of_conduct
+ @page = Page.find_by(slug: "code-of-conduct")
+ render :show if @page
+ set_surrogate_key_header "code_of_conduct_page"
+ end
+
def community_moderation
@page = Page.find_by(slug: "community-moderation")
render :show if @page
@@ -40,12 +46,24 @@ class PagesController < ApplicationController
set_surrogate_key_header "faq_page"
end
+ def privacy
+ @page = Page.find_by(slug: "privacy")
+ render :show if @page
+ set_surrogate_key_header "privacy_page"
+ end
+
def post_a_job
@page = Page.find_by(slug: "post-a-job")
render :show if @page
set_surrogate_key_header "post_a_job_page"
end
+ def terms
+ @page = Page.find_by(slug: "terms")
+ render :show if @page
+ set_surrogate_key_header "terms_page"
+ end
+
def tag_moderation
@page = Page.find_by(slug: "tag-moderation")
render :show if @page
diff --git a/app/views/admin/pages/index.html.erb b/app/views/admin/pages/index.html.erb
index a87b0ecf9..2c81364ca 100644
--- a/app/views/admin/pages/index.html.erb
+++ b/app/views/admin/pages/index.html.erb
@@ -2,14 +2,51 @@
Pages
- <%= link_to "New page", new_admin_page_path, class: "btn btn-primary ml-auto" %>
+ <%= link_to "New page", new_admin_page_path, class: "ml-auto crayons-btn crayons-btn--s" %>
Effective May 25, 2018
+This policy covers <%= community_name %>.
+In order to give you the best possible experience using <%= community_name %>, we collect information from your interactions with our network. We use common internet technologies, such as cookies and web server logs. We collect this basic information from everybody, whether they have an account or not.
+The information we collect about all visitors to our website includes:
+We use this information to:
+In order for you to create an account on <%= community_name %> and use our Services, we need to collect and process certain information. Depending on your use of the Services, that may include:
+We do not share, sell, rent, or trade User Personal Information with third parties for commercial purposes.
+
+
+ We do share certain aggregated, non-personally identifying information with others about how our users, collectively, use <%= community_name %>. For example, we may share information pertaining to the popularity of different programming languages for advertising partners.
+
+
+ We do host first-party advertising on <%= community_name %>. We do not run any code from advertisers and all ad images are hosted on managed <%= community_name %> servers. For more details, see our section on Advertising Details.
+
+
+ We may use User Personal Information with your permission, so we can perform services you have authorized. For example, if you indicate you are looking for work, we may contact you with opportunities.
+
+
+ We may share User Personal Information with a limited number of third party vendors who process it on our behalf to provide or improve our service, and who have agreed to privacy restrictions similar to our own Privacy Statement. Our third party vendors are listed below.
+
We target advertisements based solely upon:
+We may place ads in:
+All registered members have the ability to disable advertisements — where reasonable — through their Settings page. For instance, it’s not feasible to disable certain advertisements in the form of recognition posts, site-wide contests, dedicated sponsorship page, etc.
++ We may share your account information with third parties in some circumstances, including: (1) with your consent; (2) to a service provider or partner who meets our data protection standards; (3) for survey or research purposes, after aggregation, anonymization, or pseudonomization; (4) when we have a good faith belief it is required by law, such as pursuant to a subpoena or other legal process; (5) when we have a good faith belief that doing so will help prevent imminent harm to someone. +
+Data Storage
+
+ <%= community_name %> uses third-party vendors and hosting partners for hardware, software, networking, storage, and related technology we need to run <%= community_name %>. By using <%= community_name %> Services, you authorize <%= community_name %> to transfer, store, and use your information in the United States and any other country where we operate. All service providers and third-party vendors are required to meet our data protection standards.
+
Site monitoring
+
+ <%= community_name %> uses a variety of third-party services to diagnose errors and improve the performance of our site. We aim to minimize the amount of personal information shared, but the information may include your IP address or other identifying information. All service providers and third-party vendors are required to meet our data protection standards.
+
Payment processing
+
+ <%= community_name %> does not process payments directly — we rely on third-party services such as Stripe, Shopify, and Paypal to receive payments and store any payment information.
+ <% if SiteConfig.shop_url.present? %>
+ The <%= community_name %> Shop is run through Shopify, a third-party e-commerce platform with their own Privacy Policy.
+ <% end %>
+
Third-Party Embeds
+
+ Some of the content that you see displayed on <%= community_name %> is not hosted by <%= community_name %>. These
+ “embeds” are hosted by a third-party and embedded in <%= community_name %>. For example: YouTube videos, Codepens,
+ Twitter tweets, or GitHub code that appear within a <%= community_name %> post. These files send data to the hosted
+ site just as if you were visiting that site directly (for example, when you load a <%= community_name %> post page with
+ a YouTube video embedded in it, YouTube receives data about your activity). <%= community_name %> does not control what
+ data third parties collect in cases like this, or what they will do with it. Third-party embeds on <%= community_name %>
+ are not covered by this privacy policy; they are covered by the privacy policy of the third-party service. Be mindful
+ when interacting with these services.
+
Facebook (visitor action pixel)
+
+ We use the “visitor action pixels” from Facebook Inc on our website.
+
+
+ This allows user behavior to be tracked after they have been redirected to our website by clicking on a Facebook ad. This enables us to measure the effectiveness of Facebook ads. The data collected in this way is anonymous to us, i.e. we do not see the personal data of individual users. However, this data is stored and processed by Facebook, which is why we are informing you, based on our knowledge of the situation. Facebook may link this information to your Facebook account and also use it for its own promotional purposes, in accordance with
+ Facebook’s Data Usage Policy. You can object to the collection of your data by Facebook pixel, or to the use of your data for the purpose of displaying Facebook ads by contacting the following address: https://www.facebook.com/settings?tab=ads.
+
Tracking & Cookies
+
+ We use browser cookies and similar technologies to recognize you when you return to our Services. Third-party vendors may also use cookies for various reasons.
+
+
+ <%= community_name %> uses a specific cookie in order to facilitate the use of Google Universal Analytics for users
+ logged-in to the Applications or the Platforms (“Logged-In User). If you are a Logged-In User, <%= community_name %>
+ may use your <%= community_name %> user ID in combination with Google Universal Analytics and Google Analytics to track
+ and analyze the pages of the Services you visit. We do this only to better understand how you use the Website and the
+ other Services, with a view to offering improvements for all <%= community_name %> users; and to tailor our business
+ and marketing activities accordingly, both generally and specifically to you. Google Analytics cookies do not provide
+ <%= community_name %> with any Personal Information.You can prevent Google Analytics from recognizing you on return
+ visits to this site by disabling cookies on your browser.
+
+
+ You may opt-out of this feature by installing the Google Analytics Opt-out Browser Add-on, by setting your web browser to refuse cookies, or by setting your browser to alert you when cookies are being sent. If you do so, note that some parts of the Site may not function properly.
+
Data Security
+
+ We use encryption (HTTPS/TLS) to protect data transmitted to and from our site. However, no data transmission over the Internet is 100% secure, so we can’t guarantee security. You use the Service at your own risk, and you’re responsible for taking reasonable measures to secure your account.
+
Administrative Emails from <%= community_name %>
+
+ Sometimes we’ll send you emails about your account, service changes or new policies. You can’t opt out of this type of “transactional” email (unless you delete your account).
+
+
+ When you interact with a transactional email sent from <%= community_name %> (such as opening an email or clicking on a particular link in an email), we may receive information about that interaction.
+
Non-administrative Emails from <%= community_name %>
+
+ Upon creating a <%= community_name %> account, you will be opted into the <%= community_name %> Newsletter and other non-administrative email. Your email address and user profile information may be stored by a third-party email provider such as MailChimp or Sendgrid. You can opt out of non-administrative emails such as digests, newsletters, and activity notifications through your account’s “Settings” page and at the link of the footer in any non-administrative email you receive from us.
+
+
+ When you interact with a non-administrative email sent from <%= community_name %> (such as opening an email or clicking on a particular link in an email), we may receive information about that interaction.
+
Deleting Your Personal Information
+
+ You may request deletion of your personal information and account by emailing <%= email_link(:privacy) %>.
+
+
+ To protect information from accidental or malicious destruction, we may maintain residual copies for a brief time period. But, if you delete your account, your information and content will be unrecoverable after that time.
+
Data Portability
+
+ If you would like to request a copy of your user data, please email <%= email_link(:privacy) %>.
Business Transfers
+
+ If we are involved in a merger, acquisition, bankruptcy, reorganization or sale of assets such that your information would be transferred or become subject to a different privacy policy, we’ll notify you in advance of any such change.
+
Changes to this Policy
+
+ We reserve the right to revise this Privacy Policy at any time. If we change this Privacy Policy in the future, we will post the revised Privacy Policy and update the “Effective Date,” above, to reflect the date of the changes.
+
Questions
+
+ We welcome feedback about this policy at <%= email_link(:privacy) %>.
Effective May 25, 2018
-This policy covers <%= community_name %>.
-In order to give you the best possible experience using <%= community_name %>, we collect information from your interactions with our network. We use common internet technologies, such as cookies and web server logs. We collect this basic information from everybody, whether they have an account or not.
-The information we collect about all visitors to our website includes:
-We use this information to:
-In order for you to create an account on <%= community_name %> and use our Services, we need to collect and process certain information. Depending on your use of the Services, that may include:
-We do not share, sell, rent, or trade User Personal Information with third parties for commercial purposes.
-
-
- We do share certain aggregated, non-personally identifying information with others about how our users, collectively, use <%= community_name %>. For example, we may share information pertaining to the popularity of different programming languages for advertising partners.
-
-
- We do host first-party advertising on <%= community_name %>. We do not run any code from advertisers and all ad images are hosted on managed <%= community_name %> servers. For more details, see our section on Advertising Details.
-
-
- We may use User Personal Information with your permission, so we can perform services you have authorized. For example, if you indicate you are looking for work, we may contact you with opportunities.
-
-
- We may share User Personal Information with a limited number of third party vendors who process it on our behalf to provide or improve our service, and who have agreed to privacy restrictions similar to our own Privacy Statement. Our third party vendors are listed below.
-
We target advertisements based solely upon:
-We may place ads in:
-All registered members have the ability to disable advertisements — where reasonable — through their Settings page. For instance, it’s not feasible to disable certain advertisements in the form of recognition posts, site-wide contests, dedicated sponsorship page, etc.
-- We may share your account information with third parties in some circumstances, including: (1) with your consent; (2) to a service provider or partner who meets our data protection standards; (3) for survey or research purposes, after aggregation, anonymization, or pseudonomization; (4) when we have a good faith belief it is required by law, such as pursuant to a subpoena or other legal process; (5) when we have a good faith belief that doing so will help prevent imminent harm to someone. -
-Data Storage
-
- <%= community_name %> uses third-party vendors and hosting partners for hardware, software, networking, storage, and related technology we need to run <%= community_name %>. By using <%= community_name %> Services, you authorize <%= community_name %> to transfer, store, and use your information in the United States and any other country where we operate. All service providers and third-party vendors are required to meet our data protection standards.
-
Site monitoring
-
- <%= community_name %> uses a variety of third-party services to diagnose errors and improve the performance of our site. We aim to minimize the amount of personal information shared, but the information may include your IP address or other identifying information. All service providers and third-party vendors are required to meet our data protection standards.
-
Payment processing
-
- <%= community_name %> does not process payments directly — we rely on third-party services such as Stripe, Shopify, and Paypal to receive payments and store any payment information.
- <% if SiteConfig.shop_url.present? %>
- The <%= community_name %> Shop is run through Shopify, a third-party e-commerce platform with their own Privacy Policy.
- <% end %>
-
Third-Party Embeds
-
- Some of the content that you see displayed on <%= community_name %> is not hosted by <%= community_name %>. These
- “embeds” are hosted by a third-party and embedded in <%= community_name %>. For example: YouTube videos, Codepens,
- Twitter tweets, or GitHub code that appear within a <%= community_name %> post. These files send data to the hosted
- site just as if you were visiting that site directly (for example, when you load a <%= community_name %> post page with
- a YouTube video embedded in it, YouTube receives data about your activity). <%= community_name %> does not control what
- data third parties collect in cases like this, or what they will do with it. Third-party embeds on <%= community_name %>
- are not covered by this privacy policy; they are covered by the privacy policy of the third-party service. Be mindful
- when interacting with these services.
-
Facebook (visitor action pixel)
-
- We use the “visitor action pixels” from Facebook Inc on our website.
-
-
- This allows user behavior to be tracked after they have been redirected to our website by clicking on a Facebook ad. This enables us to measure the effectiveness of Facebook ads. The data collected in this way is anonymous to us, i.e. we do not see the personal data of individual users. However, this data is stored and processed by Facebook, which is why we are informing you, based on our knowledge of the situation. Facebook may link this information to your Facebook account and also use it for its own promotional purposes, in accordance with
- Facebook’s Data Usage Policy. You can object to the collection of your data by Facebook pixel, or to the use of your data for the purpose of displaying Facebook ads by contacting the following address: https://www.facebook.com/settings?tab=ads.
-
Tracking & Cookies
-
- We use browser cookies and similar technologies to recognize you when you return to our Services. Third-party vendors may also use cookies for various reasons.
-
-
- <%= community_name %> uses a specific cookie in order to facilitate the use of Google Universal Analytics for users
- logged-in to the Applications or the Platforms (“Logged-In User). If you are a Logged-In User, <%= community_name %>
- may use your <%= community_name %> user ID in combination with Google Universal Analytics and Google Analytics to track
- and analyze the pages of the Services you visit. We do this only to better understand how you use the Website and the
- other Services, with a view to offering improvements for all <%= community_name %> users; and to tailor our business
- and marketing activities accordingly, both generally and specifically to you. Google Analytics cookies do not provide
- <%= community_name %> with any Personal Information.You can prevent Google Analytics from recognizing you on return
- visits to this site by disabling cookies on your browser.
-
-
- You may opt-out of this feature by installing the Google Analytics Opt-out Browser Add-on, by setting your web browser to refuse cookies, or by setting your browser to alert you when cookies are being sent. If you do so, note that some parts of the Site may not function properly.
-
Data Security
-
- We use encryption (HTTPS/TLS) to protect data transmitted to and from our site. However, no data transmission over the Internet is 100% secure, so we can’t guarantee security. You use the Service at your own risk, and you’re responsible for taking reasonable measures to secure your account.
-
Administrative Emails from <%= community_name %>
-
- Sometimes we’ll send you emails about your account, service changes or new policies. You can’t opt out of this type of “transactional” email (unless you delete your account).
-
-
- When you interact with a transactional email sent from <%= community_name %> (such as opening an email or clicking on a particular link in an email), we may receive information about that interaction.
-
Non-administrative Emails from <%= community_name %>
-
- Upon creating a <%= community_name %> account, you will be opted into the <%= community_name %> Newsletter and other non-administrative email. Your email address and user profile information may be stored by a third-party email provider such as MailChimp or Sendgrid. You can opt out of non-administrative emails such as digests, newsletters, and activity notifications through your account’s “Settings” page and at the link of the footer in any non-administrative email you receive from us.
-
-
- When you interact with a non-administrative email sent from <%= community_name %> (such as opening an email or clicking on a particular link in an email), we may receive information about that interaction.
-
Deleting Your Personal Information
-
- You may request deletion of your personal information and account by emailing <%= email_link(:privacy) %>.
-
-
- To protect information from accidental or malicious destruction, we may maintain residual copies for a brief time period. But, if you delete your account, your information and content will be unrecoverable after that time.
-
Data Portability
-
- If you would like to request a copy of your user data, please email <%= email_link(:privacy) %>.
Business Transfers
-
- If we are involved in a merger, acquisition, bankruptcy, reorganization or sale of assets such that your information would be transferred or become subject to a different privacy policy, we’ll notify you in advance of any such change.
-
Changes to this Policy
-
- We reserve the right to revise this Privacy Policy at any time. If we change this Privacy Policy in the future, we will post the revised Privacy Policy and update the “Effective Date,” above, to reflect the date of the changes.
-
Questions
-
- We welcome feedback about this policy at <%= email_link(:privacy) %>.