这篇文章更多的是为了获得建议和想法,而不是解决问题。解释起来有点困难,但我会尽力的。
我有一个文档存储库,其中包含一个带有 PDF 的唯一目录,这些文档必须在“虚拟”文件夹中向最终用户显示,因为它们必须在其中许多文件夹中可见。我所说的虚拟文件夹是文件系统中正常的目录层次结构,但最终文档必须取自前面提到的 PDF 存储库。
示例:
repo/{dozens of PDF}
rootfolder/sub-folder1/sub-folder11/contracts1.php
/sub-folder2/contracts1.php
/sub_folder3/sub-folder31/contracts2.php
/sub_folder4/sub-folder41/sub-folder42/sub-folder43/contracts3.php
/sub-folder5/contracts5.php
这是一个我的老板希望很快准备好的项目,所以此时我一直在使用 php-file-tree 生成一个很好的树状方式来浏览文件夹,每个文件夹中的最终文件是一个带有 PDF 列表的 php 文件。它工作得很好,但是对于每一个更改,我都需要编辑这些 php 文件,将来这个任务应该由其他人(不具备 HTML/PHP 编辑知识的 Office 用户)以简单的方式完成。
你们会推荐我什么?
两件重要的事情是:
-
PDF 必须在一个单独的文件中
位置,单个目录
最终用户必须看到树状页面
谢谢。
法比恩
This post is more to get advises and ideas rather than solving a problem. It's a bit difficult to explain, but I will try my best.
I have a document repository which consists of a unique directory with PDF, these documents have to be displayed to the end-user in "virtual" folders, as they must be visible in many of them. What I call virtual folders are a normal hierarchy of directories in the filesystem, but the final documents must be taken from the PDF repository mentioned previously.
Examples :
repo/{dozens of PDF}
rootfolder/sub-folder1/sub-folder11/contracts1.php
/sub-folder2/contracts1.php
/sub_folder3/sub-folder31/contracts2.php
/sub_folder4/sub-folder41/sub-folder42/sub-folder43/contracts3.php
/sub-folder5/contracts5.php
That was a project my boss wanted to be ready very quickly, so at this moment, I've been using php-file-tree that generates a nice tree-like way to navigate through the folders, the end file in each folder being a php file with the list of PDF. It works great, but for every changes, I need to edit those php files, and in the future this task should be done by someone else (an office user with no knowledge in HTML/PHP editing) in a easy way.
What would you guys recommend me?
The 2 important things are :
-
the PDFs must be in one single
location, single directory
-
the end-user must see a tree-like page
Thank you.
fabien
发布评论
评论(2)
免责声明:这可能有点多,但也许它还是有用的。
他们的方式我会这样做:
使用 ExtJs 与 Ext.tree.Panel (一棵树是 pdf 的来源,第二个是虚拟的目录)
存储数据库或 xml 文件中的最终树
为 Office 用户构建一个迷你管理 GUI
为最终用户构建一个视图,仅显示虚拟目录树及其 pdf。
Disclaimer: This is probably a bit much, but maybe it's useful anyway.
They way I would do it:
use ExtJs with Ext.tree.Panel (with one tree being your source of pdfs, and the second the virtual directories)
store the final tree in a database or xml-file
build a mini admin gui for the office user
build a view for the enduser only displaying the tree of virtual directories with their pdfs.
我将使目录树真正虚拟,即,我将在数据库中创建它,而不是在文件系统中创建它。文件列表也将在数据库中(即数据库中的文件名,文件系统上的文件)。另一个数据库表将用于将文件链接到目录。
I would make a directory tree really virtual, i.e., instead of creating it in file system, I would create it in DB. List of files would also be in DB (i.e., filenames in DB, files - on filesystem). Another DB table would be used for linking files to directories.