client/src/components/Session.js
changeset 162 1fd73fdaf4c6
parent 161 a642639dbc07
child 165 62e5be0df812
--- a/client/src/components/Session.js	Mon Oct 08 04:09:19 2018 +0200
+++ b/client/src/components/Session.js	Tue Oct 09 10:52:23 2018 +0200
@@ -8,6 +8,7 @@
 import NotesList from './NotesList';
 import SessionForm from './SessionForm';
 import SessionSummary from './SessionSummary';
+import ProtocolSummary from './ProtocolSummary';
 import * as sessionsActions from '../actions/sessionsActions';
 import * as notesActions from '../actions/notesActions';
 import * as userActions from '../actions/userActions';
@@ -16,13 +17,21 @@
 import { extractAnnotationCategories, defaultAnnotationsCategories } from '../constants';
 
 class Session extends Component {
+
+  onClickReadOnly = (e) => {
+    e.preventDefault();
+    this.props.history.push('/read-only/' + this.props.match.params.id);
+  }
+
   render() {
+
     return (
       <div>
         <Navbar history={this.props.history} />
         <div className="session-container">
           <div className="session-notes">
           <div className="notes-affix">
+            <a onClick={this.onClickReadOnly} href="/read-only"><span className="material-icons text-primary">remove_red_eye</span></a>
             <SessionSummary notes={this.props.notes} />
           </div>
             <div className="notes-list">