Moodle
  1. Moodle
  2. MDL-32999 META: Files UI Stage 2 polishing in master
  3. MDL-33419

Display reference/source icons in list and table view in filemanager

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Filepicker
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Login as admin
      2. Create Folder resource (Folder1) and add one file
      3. Create Folder resource (Folder2) and link to file from Folder1 (Though server files area)
      4. Now view list and tree view for Folder1 and Folder2 and make sure source/reference icons are visible as shown in icon view.
      Show
      Login as admin Create Folder resource (Folder1) and add one file Create Folder resource (Folder2) and link to file from Folder1 (Though server files area) Now view list and tree view for Folder1 and Folder2 and make sure source/reference icons are visible as shown in icon view.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-33419-master
    • Rank:
      41296

      Description

      At the moment in the icon view in filemanager user is able to see reference/source icons but in list and table view he can't.

      Also there is another issue MDL-33417 that will show those icons in filepicker as well. Please make sure that html/CSS is ready for that.

        Issue Links

          Activity

          Hide
          Barbara Ramiro added a comment -

          Raj, thanks for the initial work. I had to change the bottom position to top because when filename wraps more than one line, the reference/source icons are pushed away from the file type icons. Also made smaller version to make it look right.

          Show
          Barbara Ramiro added a comment - Raj, thanks for the initial work. I had to change the bottom position to top because when filename wraps more than one line, the reference/source icons are pushed away from the file type icons. Also made smaller version to make it look right.
          Hide
          Aparup Banerjee added a comment - - edited

          hi guys, just looking at 'fp-reficons1' and 'fp-reficons2'.

          • i'm not sure why we have a hardcoded list of 2 icons there when the file can be either only a link or only an alias. (unless both are being allowed somehow in some strange way).
          • also perhaps it'd be better to call the classes fp-reficons-source and fp-reficons-reference.
          • also i'm seeing the link and alias icons when i am adding the file. i don't however see it when i edit the folder resource again (after following the test)
            what do you think?
          Show
          Aparup Banerjee added a comment - - edited hi guys, just looking at 'fp-reficons1' and 'fp-reficons2'. i'm not sure why we have a hardcoded list of 2 icons there when the file can be either only a link or only an alias. (unless both are being allowed somehow in some strange way). also perhaps it'd be better to call the classes fp-reficons-source and fp-reficons-reference. also i'm seeing the link and alias icons when i am adding the file. i don't however see it when i edit the folder resource again (after following the test) what do you think?
          Hide
          Marina Glancy added a comment -

          Apu, first there was one div with class 'fp-reficons', then DS said that file can be both source and alias so we changed it. Now we can change back of course

          Show
          Marina Glancy added a comment - Apu, first there was one div with class 'fp-reficons', then DS said that file can be both source and alias so we changed it. Now we can change back of course
          Hide
          Marina Glancy added a comment -

          it is now not possible to create an alias to alias. See MDL-33452

          Show
          Marina Glancy added a comment - it is now not possible to create an alias to alias. See MDL-33452
          Hide
          Aparup Banerjee added a comment -

          thanks Marina, i think its ok to create another issue to change this back if there is no time now.

          • i still don't see the link and alias icons when editing files in folder resource. not sure if i should actually.
          Show
          Aparup Banerjee added a comment - thanks Marina, i think its ok to create another issue to change this back if there is no time now. i still don't see the link and alias icons when editing files in folder resource. not sure if i should actually.
          Hide
          Aparup Banerjee added a comment -

          hm the edit showing linking seem to work for Barbara, trying again here.

          Show
          Aparup Banerjee added a comment - hm the edit showing linking seem to work for Barbara, trying again here.
          Hide
          Aparup Banerjee added a comment -

          oof : i hit a json error while trying to create an alias within 'recent files'

          Invalid JSON string
          Notice: unserialize() [function.unserialize]: Error at offset 0 of 7 bytes in /home/aparup/mcode/integration/repository/lib.php on line 654

          {"error":"error\/filereferenceproblem","stacktrace":"* line 1664 of \/lib\/filestorage\/file_storage.php: file_reference_exception thrown\n* line 1160 of \/repository\/lib.php: call to file_storage::unpack_reference()\n* line 1237 of \/repository\/lib.php: call to repository->get_reference_details()\n* line 245 of \/repository\/repository_ajax.php: call to repository->get_file_source_info()\n","debuginfo":"Invalid base64 format\nError code: filereferenceproblem\n$a contents: stdClass Object\n(\n [repositoryid] => \n [reference] => \/Aparup.jpg\n [referencefileid] => \n [fileid] => \n)\n","reproductionlink":"http:\/\/aparup.moodle.local\/integration\/"}
          Show
          Aparup Banerjee added a comment - oof : i hit a json error while trying to create an alias within 'recent files' Invalid JSON string Notice: unserialize() [function.unserialize] : Error at offset 0 of 7 bytes in /home/aparup/mcode/integration/repository/lib.php on line 654 {"error":"error\/filereferenceproblem","stacktrace":"* line 1664 of \/lib\/filestorage\/file_storage.php: file_reference_exception thrown\n* line 1160 of \/repository\/lib.php: call to file_storage::unpack_reference()\n* line 1237 of \/repository\/lib.php: call to repository->get_reference_details()\n* line 245 of \/repository\/repository_ajax.php: call to repository->get_file_source_info()\n","debuginfo":"Invalid base64 format\nError code: filereferenceproblem\n$a contents: stdClass Object\n(\n [repositoryid] => \n [reference] => \/Aparup.jpg\n [referencefileid] => \n [fileid] => \n)\n","reproductionlink":"http:\/\/aparup.moodle.local\/integration\/"}
          Hide
          Aparup Banerjee added a comment -

          hm this is working fine totally for me now. must've been some caching issues. integrating...

          Show
          Aparup Banerjee added a comment - hm this is working fine totally for me now. must've been some caching issues. integrating...
          Hide
          Aparup Banerjee added a comment -

          thanks, integrated into master (tested too, passing.)

          Show
          Aparup Banerjee added a comment - thanks, integrated into master (tested too, passing.)
          Hide
          Aparup Banerjee added a comment -

          nice work, this works!

          Show
          Aparup Banerjee added a comment - nice work, this works!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yay. just in time for Moodle 2.3 release! Many thanks!

          Closing as fixed, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yay. just in time for Moodle 2.3 release! Many thanks! Closing as fixed, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: