Skip to content

Commit

Permalink
Markup and style adjustments to OSF archive version history
Browse files Browse the repository at this point in the history
  • Loading branch information
danhorst authored and Jeremy Friesen committed Jan 9, 2017
1 parent a0c3d7e commit e77aaf9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions app/assets/stylesheets/modules/attributes.css.scss
Expand Up @@ -48,3 +48,13 @@
}
}
}

.table.related-to-works {
.selected-row {
border: 2px solid $blue-light;
}

.modifier.current {
width: 3em;
}
}
16 changes: 8 additions & 8 deletions app/views/curation_concern/osf_archives/_attributes.html.erb
Expand Up @@ -33,27 +33,27 @@
</tbody>
</table>

<h2>Archived Versions of OSF Project</h2>
<h2>Version History</h2>
<table class="table table-striped <%= dom_class(curation_concern) %> related-to-works with-headroom">
<caption class="table-heading">
<p>CurateND Works that are different snapshots of the same OSF Project.</p>
<p>These are different snapshots of the same OSF Project.</p>
</caption>
<thead>
<tr>
<th>&nbsp;</th>
<th>CurateND Identifier</th>
<th>Date Archived</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
<% curation_concern.archived_versions_of_source_project.each do |archived_version| %>
<tr class="referenced_by_works attributes">
<% is_viewing_version = (archived_version.pid == curation_concern.pid) %>
<tr class="referenced_by_works attributes <%= 'selected-row' if is_viewing_version %>">
<td class="modifier current"><%= is_viewing_version ? 'Viewing' : '&nbsp;'.html_safe %></td>
<td class="attribute noid">
<% link_class = (archived_version.pid == curation_concern.pid ? "current-work" : "another-work") %>
<%= link_to(archived_version.noid, polymorphic_path([:curation_concern, archived_version]), class: link_class) %>
<%= link_to_unless(is_viewing_version, archived_version.noid, polymorphic_path([:curation_concern, archived_version])) %>
</td>
<td class="attribute date_archived"><%= archived_version.date_archived.strftime('%Y-%m-%d') %></td>
<td><%= archived_version.pid == curation_concern.pid ? 'This Work' : '&nbsp;'.html_safe %></td>
<td class="attribute date_archived"><%= content_tag :time, archived_version.date_archived.strftime('%Y-%m-%d'), datetime: archived_version.date_archived.iso8601 %></td>
</tr>
<% end %>
</tbody>
Expand Down

0 comments on commit e77aaf9

Please sign in to comment.