fix feeback dropbox

pull/2487/head
Alex Aragon 7 years ago
parent a44d22eee8
commit eee3bd32dd
  1. 9
      app/Resources/public/css/base.css
  2. 5
      main/admin/settings.lib.php
  3. 22
      main/dropbox/dropbox_functions.inc.php
  4. 9
      main/dropbox/index.php

@ -5840,12 +5840,14 @@ footer{
bottom: 0;
left: 0px;
margin-bottom: 0px;
padding-top: 20px;
padding-bottom: 10px;
padding: 10px 20px;
border-top: 1px solid #DCE4EC;
background: #ffffff;
width: 100%;
}
.bottom_actions_fixed .btn-primary{
font-size: 12px;
}
#toolshortcuts_horizontal{
padding-top: 15px;
padding-bottom: 15px;
@ -6205,6 +6207,9 @@ a.panel-image{
#resource_tab #subtab #ul_subtab li a{
padding: 10px 15px;
}
.feeback-form .form-group .form-control{
width: 100%;
}
/* CSS NEW TOP ******************************************************************************/
/* CSS Responsive */
@media (min-width: 1025px) and (max-width: 1200px) {

@ -240,8 +240,9 @@ function handlePlugins()
echo '</table>';
echo '<div class="form-actions bottom_actions">';
echo '<button class="btn btn-success" type="submit" name="submit_plugins">'.
get_lang('EnablePlugins').'</button>';
echo '<button class="btn btn-primary" type="submit" name="submit_plugins">';
echo '<i class="fa fa-check" aria-hidden="true"></i> ';
echo get_lang('EnablePlugins').'</button>';
echo '</div>';
echo '</form>';
}

@ -1099,13 +1099,13 @@ function store_add_dropbox($file = [], $work = null)
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
*/
function feedback($array)
function feedback($array, $url)
{
$output = null;
foreach ($array as $value) {
$output .= format_feedback($value);
}
$output .= feedback_form();
$output .= feedback_form($url);
return $output;
}
@ -1134,16 +1134,26 @@ function format_feedback($feedback)
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
*/
function feedback_form()
function feedback_form($url)
{
$return = get_lang('AddNewFeedback').'<br />';
$return = '<div class="feeback-form">';
$number_users_who_see_file = check_if_file_exist($_GET['id']);
if ($number_users_who_see_file) {
$token = Security::get_token();
$return .= '<textarea name="feedback" style="width: 80%; height: 80px;"></textarea>';
$return .= '<div class="form-group">';
$return .= '<input type="hidden" name="sec_token" value="'.$token.'"/>';
$return .= '<br /><button type="submit" class="btn btn-primary" name="store_feedback" value="'.get_lang('Ok').'"
$return .= '<label class="col-sm-3 control-label">'.get_lang('AddNewFeedback');
$return .= '</label>';
$return .= '<div class="col-sm-6">';
$return .= '<textarea name="feedback" class="form-control" rows="4"></textarea>';
$return .= '</div>';
$return .= '<div class="col-sm-3">';
$return .= '<div class="pull-right"><a class="btn btn-default btn-sm" href="'.$url.'"><i class="fa fa-times" aria-hidden="true"></i></a></div>';
$return .= '<button type="submit" class="btn btn-primary btn-sm" name="store_feedback" value="'.get_lang('Ok').'"
onclick="javascript: document.form_dropbox.attributes.action.value = document.location;">'.get_lang('AddComment').'</button>';
$return .= '</div>';
$return .= '</div>';
$return .= '</div>';
} else {
$return .= get_lang('AllUsersHaveDeletedTheFileAndWillNotSeeFeedback');
}

@ -627,10 +627,11 @@ if ($action != 'add') {
// This is a hack to have an additional row in a sortable table
if ($action == 'viewfeedback' && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) {
$action_icons .= "</td></tr>\n"; // ending the normal row of the sortable table
$action_icons .= "<tr><td colspan=\"2\">";
$action_icons .= "<a class=\"btn btn-default\" href=\"".api_get_path(WEB_CODE_PATH)."dropbox/index.php?".api_get_cidreq()."&view_received_category=".$viewReceivedCategory."&view_sent_category=".$viewSentCategory."&view=".$view.'&'.$sort_params."\">".
get_lang('CloseFeedback')."</a>";
$action_icons .= "</td><td colspan=\"7\">".feedback($dropbox_file->feedback2)."</td></tr>";
$action_icons .= "<tr><td colspan=\"9\">";
$url = api_get_path(WEB_CODE_PATH)."dropbox/index.php?".api_get_cidreq()."&view_received_category=".$viewReceivedCategory."&view_sent_category=".$viewSentCategory."&view=".$view.'&'.$sort_params;
$action_icons .= feedback($dropbox_file->feedback2, $url);
//$action_icons .= "<a class=\"btn btn-default\" href=\""><i class=\"fa fa-times\" aria-hidden=\"true\"></i></a>";
$action_icons .= "</tr>";
}
$dropbox_file_data[] = $action_icons;
$dropbox_file_data[] = $lastUploadDate;

Loading…
Cancel
Save