Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonize input type "literature" #253

Open
dersmon opened this issue Jul 30, 2024 · 1 comment
Open

Harmonize input type "literature" #253

dersmon opened this issue Jul 30, 2024 · 1 comment
Labels
enhancement field_desktop Issue concerning the Desktop client field_publication Issue concerning the FieldPublication server

Comments

@dersmon
Copy link
Member

dersmon commented Jul 30, 2024

This issue came up while I implemented the output for literature type input values in FieldPublication. There are different keys for "zenonId" (zenon.dainst.org links) and "doi" (doi.org links). This should be harmonized in a single key "reference" or something similar, that contains an external link.

The current FieldPublication implementation looks something like this:

    ~H"""
    <%= if is_list(@field.value) do %>
      <ul>
        <%= for value <- @field.value do %>
          <%= cond do %>
            <% Map.has_key?(value, "doi") -> %>
              <li>
                <a href={value["doi"]} target="_blank"><%= value["quotation"] %></a>
              </li>
            <% Map.has_key?(value, "zenonId") -> %>
              <li>
                <a href={value["zenonId"]} target="_blank"><%= value["quotation"] %></a>
              </li>
            <% Map.has_key?(value, "quotation") -> %>
              <li>
                <%= value["quotation"] %>
              </li>
            <% true -> %>
              <li>
                <.render_warning value={value} />
              </li>
          <% end %>
        <% end %>
      </ul>
    <% else %>
      <.render_warning {assigns} />
    <% end %>
    """
@dersmon dersmon added enhancement field_desktop Issue concerning the Desktop client field_publication Issue concerning the FieldPublication server labels Jul 30, 2024
@lsteinmann
Copy link
Member

lsteinmann commented Aug 1, 2024

I really don't agree on treating DOI and Zenon-ID as the same kind of reference. A DOI typically leads to the work itself, while the Zenon-ID would only point to the entry in our library system. The DOI is a part of the citation in accordance with the DAI citation guidelines, the Zenon-ID is not (and should never be). However, the Zenon-ID is still used in DAI publications for linking references the same way that you do here.

According to the citation guidelines, a literature reference where the work in question has a DOI (and in this case, also a Zenon-ID) would actually need to look like this:

~H"""
<li>
    <a href={value["zenonId"]} target="_blank"><%= value["quotation"] %></a>, 
    <a href={value["doi"]} target="_blank"><%= value["doi"] %></a>
</li>
"""

(N. Benecke, Wirtschaft und Umwelt früher Bauern in Thrakien: Archäozoologische Studien an Fundmaterialien aus Drama (Bulgarien) und Kırklareli-Aşağı Pınar (Türkei), Archäometrische Studien 1 (Wiesbaden 2020), https://doi.org/10.34780/archmetrs.v1i0.1000)

Linking the text of the citation that is not the DOI to Zenon is just fancy candy. (Though it is nice.)

But: We could discuss changing Zenon-ID to any other link to any other bibliographic reference, for which the input would need to be a full URL though - or a complex input from which you choose the reference system. The latter would overly complicate the whole thing in my opinion. (Speaking as someone who has had to do this many many times: It is already a lot of work to input literature references properly.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement field_desktop Issue concerning the Desktop client field_publication Issue concerning the FieldPublication server
Projects
Status: No status
Development

No branches or pull requests

2 participants