forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html.erb
More file actions
52 lines (48 loc) · 2.2 KB
/
Copy pathindex.html.erb
File metadata and controls
52 lines (48 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<%
add_crumb(@user.name, user_path(@user) )
add_crumb t('crumbs.faculty_journal', "Faculty Journal")
js_bundle :user_notes
css_bundle :user_notes
%>
<% content_for :page_title do %><%= t :page_title, "Faculty Journal" %><% end %>
<% if can_do(@user, @current_user, :create_user_notes) %>
<% content_for :right_side do %>
<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>
<% end %>
<% end %>
<h1 class="page-header"><%= t 'titles.journal_for', "Faculty Journal for %{user}", :user => @user.name %><span id="proccessing"> </span></h1>
<div id="create_entry" style="display: none; margin-bottom: 10px;">
<%= form_for(@user_note, :url => user_user_notes_path, :html=>{:id=>'add_entry_form'}) do |f| %>
<%= f.error_messages %>
<%= f.hidden_field :user_id, :value=>@user.id %>
<table class="formtable" style="width: 100%;">
<tr>
<td>
<%= f.label :title, t("Title") %>
<%= f.text_field :title, :class => "title", :style => "width: 98%;", :placeholder => t(:title, "Title") %>
</td>
</tr>
<tr>
<td colspan="2">
<%= f.label :note, t("Note") %>
<%= f.text_area :note, :class => "note", :style => "width: 98%; height: 200px;" %>
</td>
</tr>
<tr>
<td colspan="2">
<div class="button-container clearfix pull-right">
<button type="button" class="cancel_button btn button-secondary"><%= t '#buttons.cancel', "Cancel" %></button>
<button type="submit" class="btn btn-primary send_button"><%= t 'buttons.create', "Create Entry" %></button>
</div>
</td>
</tr>
</table>
<% end %>
</div>
<div id="#no_user_notes_message" style="display: none;"><%= t 'messages.no_entries', "There are no journal entries for this student." %></div>
<div id="user_note_list" class="user_note_list">
<%= 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}%>
</div>