cc_prefs.mustache 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <%
  19. @show_cc_prefs = @current_pseudonym &&
  20. @current_pseudonym.login_count < 10 &&
  21. @current_user &&
  22. !@current_user.fake_student? &&
  23. !@current_user.used_feature?(:cc_prefs)
  24. %>
  25. <% if @show_cc_prefs %>
  26. <div class="ic-notification">
  27. <div class="ic-notification__icon" role="presentation">
  28. <i class="icon-info"></i>
  29. <span class="screenreader-only">
  30. <%= accessible_message_icon_text("information") %>
  31. </span>
  32. </div>
  33. <div class="ic-notification__content">
  34. <div class="ic-notification__message">
  35. <h4 class="ic-notification__title">
  36. {{#t}}Notifications{{/t}}.
  37. </h4>
  38. <span class="notification_message">
  39. {{#t}}Tell us how and when you would like to be notified of events in Canvas.{{/t}}
  40. </span>
  41. </div>
  42. <div class="ic-notification__actions">
  43. <%= link_to(t("Notification Preferences"), communication_profile_path, :class => "Button Button--small Button--primary", :role => "button") %>
  44. </div>
  45. </div>
  46. </div>
  47. <% end %>