%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
%>
<%
add_crumb(@user.name, user_path(@user) )
add_crumb t('crumbs.faculty_journal', "Faculty Journal")
js_bundle :user_notes
css_bundle :user_notes
%>
<% provide :page_title do %><%= t :page_title, "Faculty Journal" %><% end %>
<% if can_do(@user, @current_user, :create_user_notes) %>
<% provide :right_side do %>
<% end %>
<% end %>
<%= form_for(@user_note, :url => user_user_notes_path, :html=>{:id=>'add_entry_form'}) do |f| %>
<% if @user_note.errors.any? %>
<%= t({
one: "1 error prohibited this note from being saved:",
other: "%{count} errors prohibited this note from being saved:" },
count: @user_note.errors.count
) %>
<% @user_note.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
<%= f.hidden_field :user_id, :value=>@user.id %>
<% end %>
<%= render :partial => 'user_note', :collection => @user_notes %>
<%= will_paginate(@user_notes, :style=>"margin-bottom: 1em;") %>
<% pageless(@user_notes.total_pages, user_user_notes_path) %>
<%= render :partial => 'user_note', :locals => {:user_note => @user_note}%>