index.mustache 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. add_crumb(@user.name, user_path(@user) )
  20. add_crumb t('crumbs.faculty_journal', "Faculty Journal")
  21. js_bundle :user_notes
  22. css_bundle :user_notes
  23. %>
  24. <% content_for :page_title do %><%= t :page_title, "Faculty Journal" %><% end %>
  25. <% if can_do(@user, @current_user, :create_user_notes) %>
  26. <% content_for :right_side do %>
  27. <a id="new_user_note_button" class="new btn button-sidebar-wide icon-add" href="#"><%= t 'links.create_new_entry', "Create a New Entry" %></a>
  28. <% end %>
  29. <% end %>
  30. <h1 class="page-header"><%= t 'titles.journal_for', "Faculty Journal for %{user}", :user => @user.name %><span id="proccessing">&nbsp;</span></h1>
  31. <div id="create_entry" style="display: none; margin-bottom: 10px;">
  32. <%= form_for(@user_note, :url => user_user_notes_path, :html=>{:id=>'add_entry_form'}) do |f| %>
  33. <%= f.error_messages %>
  34. <%= f.hidden_field :user_id, :value=>@user.id %>
  35. <table class="formtable" style="width: 100%;">
  36. <tr>
  37. <td>
  38. <%= f.label :title, t("Title") %>
  39. <%= f.text_field :title, :class => "title", :style => "width: 98%;", :placeholder => t(:title, "Title") %>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td colspan="2">
  44. <%= f.label :note, t("Note") %>
  45. <%= f.text_area :note, :class => "note", :style => "width: 98%; height: 200px;" %>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td colspan="2">
  50. <div class="button-container clearfix pull-right">
  51. <button type="button" class="cancel_button btn button-secondary"><%= t '#buttons.cancel', "Cancel" %></button>
  52. <button type="submit" class="btn btn-primary send_button"><%= t 'buttons.create', "Create Entry" %></button>
  53. </div>
  54. </td>
  55. </tr>
  56. </table>
  57. <% end %>
  58. </div>
  59. <div id="#no_user_notes_message" style="display: none;"><%= t 'messages.no_entries', "There are no journal entries for this student." %></div>
  60. <div id="user_note_list" class="user_note_list">
  61. {{> views/user_note}}
  62. <%= will_paginate(@user_notes, :style=>"margin-bottom: 1em;") %>
  63. <% pageless(@user_notes.total_pages, user_user_notes_path) %>
  64. {{> views/user_note}}
  65. </div>