$tool_content .="<input type='hidden' name='id' value='" . getIndirectReference($noteToModify)."' />"; } $tool_content .="</fieldset> </form></div>"; } elseif (isset($_GET['nid'])) { $tool_content .= action_bar(array( array( 'title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => $_SERVER['SCRIPT_NAME'] ) )); $note = Notes::get_note(intval(getDirectReference($_GET['nid']))); $navigation[] = array("url" => "$_SERVER[SCRIPT_NAME]", "name" => $langNotes); $pageName = q($note->title); $tool_content .= " <div class='panel panel-action-btn-default'> <div class='panel-heading'> <div class='pull-right'>". action_button(array( array('title' => $langEditChange, 'url' => "$_SERVER[SCRIPT_NAME]?modify=".getIndirectReference($note->id), 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "$_SERVER[SCRIPT_NAME]?delete=".getIndirectReference($note->id), 'confirm' => $langSureToDelNote, 'class' => 'delete', 'icon' => 'fa-times')
if (!isset($gen_type_selected)) { $gen_type_selected = null; } if (!isset($course_selected)) { $course_selected = null; } if (!isset($type_selected)) { $type_selected = null; } if (!isset($object_selected)) { $object_selected = null; } $tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => $_SERVER['SCRIPT_NAME']))) . "\r\n <div class='form-wrapper'>\r\n <form class='form-horizontal' role='form' method='post' action='{$_SERVER['SCRIPT_NAME']}' onsubmit=\"return checkrequired(this, 'antitle');\">\r\n <fieldset>\r\n <div class='form-group'>\r\n <label for='newTitle' class='col-sm-2 control-label'>{$langNoteTitle}:</label>\r\n <div class='col-sm-10'>\r\n <input name='newTitle' type='text' class='form-control' id='newTitle' value='" . q($titleToModify) . "' placeholder='{$langNoteTitle}'>\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='newContent' class='col-sm-2 control-label'>{$langNoteBody}:</label>\r\n <div class='col-sm-10'>\r\n " . rich_text_editor('newContent', 4, 20, $contentToModify) . "\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <label for='refobjgentype' class='col-sm-2 control-label'>{$langReferencedObject}:</label>\r\n <div class='col-sm-10'>\r\n " . References::build_object_referennce_fields($gen_type_selected, $course_selected, $type_selected, $object_selected) . "\r\n </div>\r\n </div>\r\n <div class='form-group'>\r\n <div class='col-sm-10 col-sm-offset-2'>\r\n <input class='btn btn-primary' type='submit' name='submitNote' value='{$langAdd}'> \r\n <a class='btn btn-default' href='{$_SERVER['SCRIPT_NAME']}'>{$langCancel}</a>\r\n </div>\r\n </div> \r\n <input type='hidden' name='id' value='{$noteToModify}' />\r\n </fieldset>\r\n </form></div>"; } elseif (isset($_GET['nid'])) { $tool_content .= action_bar(array(array('title' => $langBack, 'level' => 'primary-label', 'icon' => 'fa-reply', 'url' => $_SERVER['SCRIPT_NAME']))); $note = Notes::get_note(intval($_GET['nid'])); $navigation[] = array("url" => "{$_SERVER['SCRIPT_NAME']}", "name" => $langNotes); $pageName = q($note->title); $tool_content .= "\r\n <div class='panel panel-action-btn-default'>\r\n <div class='panel-heading'>\r\n <div class='pull-right'>" . action_button(array(array('title' => $langModify, 'url' => "{$_SERVER['SCRIPT_NAME']}?modify={$note->id}", 'icon' => 'fa-edit'), array('title' => $langDelete, 'url' => "{$_SERVER['SCRIPT_NAME']}?delete={$note->id}", 'confirm' => $langSureToDelNote, 'class' => 'delete', 'icon' => 'fa-times'))) . "</div>\r\n <h3 class='panel-title'>{$note->title}</h3>\r\n </div>\r\n <div class='panel-body'>\r\n <div class='label label-success'>" . claro_format_locale_date($dateFormatLong, strtotime($note->date_time)) . "</div><br><br>\r\n {$note->content}\r\n </div>\r\n </div>"; } else { /* display actions toolbar */ $tool_content .= action_bar(array(array('title' => $langAddNote, 'url' => "{$_SERVER['SCRIPT_NAME']}?addNote=1", 'icon' => 'fa-plus-circle', 'level' => 'primary-label', 'button-class' => 'btn-success'))); /* display notes */ //$notelist = isset($_GET['nid']) ? array(Notes::get_note(intval($_GET['nid']))) : Notes::get_user_notes(); if (isset($_GET['course'])) { $cid = course_code_to_id($_GET['course']); $notelist = Notes::get_all_course_notes($cid); } else { $notelist = Notes::get_user_notes(); } //$notelist = isset($_GET['nid']) ? array(Notes::get_note(intval($_GET['nid']))) : Notes::get_user_notes();