Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

See the description of the dataSource extension.

The source code of the plugin, together with comments and an instruction for development and installation, is here.

The plugin is in the  

Zobacz opis rozszerzenia typu dataSource.

Kod źródłowy wtyczki wraz z komentarzami oraz instrukcję budowania i instalacji można znaleźć tutaj

Wtyczka znajduje się w katalogu dcore-app-extension-ds-test directory.

Rozszerznie to dodaje w kreatorze nowej publikacji możliwość wprowadzenia informacji o plikach za pomocą bardzo prostego formularza (zob. obrazek poniżej).

Image Removed

Formularz pozwala wprowadzić do dziesięciu plików. Dla każdego pliku należy podać:

The extension adds a new possibility to the new publication creator: the user can enter information about files with the use of a very simple form (see the image below).

Image Added

The user can add up to 10 files in the form. The following information should be provided for every file:

  1. its URL – which can be an Internet resource, for example,URL - może to być zasób w sieci www, np.  http://www.serwer.pl/publikacja000.pdf, albo plik na dysku, np. , or a file on the drive, for example, file://C:/temp/publikacja.pdf.
  2. Ścieżka do pliku w dLibrze - zwykle to będzie po prostu nazwa pliku, ale można też podać w ścieżce dodatkowe podkatalogi, jeśli publikacja ma złożoną strukturę. Ścieżka w dLibrze jest niezależna od podanego wcześniej odnośnika URL. System wymaga, aby ścieżka zaczynała się od ukośnika '/' i stosowała ten ukośnik do oddzielania katalogów.
  3. Czy zasób jest lokalny - jeśli tak, Aplikacja Redaktora w trakcie tworzenia publikacji prześle zawartość pliku bezpośrednio do Serwerera. W przeciwnym razie, serwer spróbuje ściągnąć zasób samodzielnie. Uwaga: ta właściwość nie zawsze jest jednoznaczna z tym, czy URL wskazuje na plik na dysku. Może się np. zdarzyć, że URL do pliku w Internecie musi być oznaczony jako lokalny, np. gdy serwer ma zablokowany dostęp do Internetu i może pobrać treść tylko za pośrednictwem komputera Redaktora. Również w drugą stronę - plik na dysku może być oznaczony jako nielokalny, jeśli znajduje się na dysku sieciowym, który w serwerze jest podpięty w taki sam sposób jak na komputerze Redaktora, dzięki czemu będzie mógł być wczytany bezpośrenio.
  4. ;
  5. the path to the file in the dLibra system – usually, it will simply be the file name, but one can also add subdirectories to the path if the publication has a complex structure; the path in the dLibra system is independent from the previously given URL; the system requires that a path begin from a slash, “/”, and use that slash to separate directorie
  6. if the resource is local – if it is, then while creating a publication, the Editor Application will send the content of the file directly to the server, and if it is not, the server will try to download the resource on its own; Note: That property does not always mean that the URL points to a file on the drive. For example, it may happen that the URL for a file on the Internet must be marked as local – e.g. when the access of the server to the Internet is blocked and the content can only be downloaded via the editor’s computer. That principle also operates the other way round – a file on the drive can be marked as non-local if it is on a network drive which is connected on the server in the same way as on the editor’s computer, so it can be uploaded directly.

The Editor Application checks the correctness of the entered data, and if an error is reported for a file, the plugin will change the color of appropriate text fields to red.

Rows which are empty or are not filled in correctly will be ignored. Changes in the text fields of the form will apply after the “Enter” key has been pressedAplikacja redaktora sprawdza poprawność wpisanych danych, a jeśli dla któregoś pliku będzie zgłoszony błąd, wtyczka zmieni kolor odpowiednich pól tekstowych na czerwony.
Puste lub niepoprawnie wypełnione wiersze będą ignorowane.
Zmiany w polach tekstowych formularza odnoszą skutek po naciśnięciu klawisza Enter.