Doc attributes display
This commit is contained in:
parent
426473773d
commit
648660bcb5
@ -24,10 +24,12 @@
|
||||
<% if object %>
|
||||
<div>
|
||||
<% object.show_custom_field_values.each do |custom_value| %>
|
||||
<p>
|
||||
<%= label_tag('', h(custom_value.custom_field.name)) %>
|
||||
<%= show_value custom_value %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, h(custom_value.custom_field.name), :class => 'label' %>
|
||||
<div class="value">
|
||||
<%= show_value custom_value %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@ -26,36 +26,38 @@
|
||||
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:file_manipulation, @project) %>
|
||||
<% if !@file.locked? %>
|
||||
<%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_lock_file), :class => 'icon icon-lock') %>
|
||||
<% unless @file.locked_for_user? %>
|
||||
<% unless @file.locked? %>
|
||||
<%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_lock_file), :class => 'icon dmsf_icon-lock') %>
|
||||
<% else %>
|
||||
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock') %>
|
||||
<% end %>
|
||||
<% if @file.notification %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon icon-email') %>
|
||||
:class => 'icon dmsf_icon-notification-on') %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_notifications_on),
|
||||
notify_activate_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_notifications_not_active_activate),
|
||||
:class => 'icon icon-email-add') %>
|
||||
:class => 'icon dmsf_icon-notification-off') %>
|
||||
<% end %>
|
||||
<%= link_to(l(:label_link_to),
|
||||
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @file.dmsf_folder ? @file.dmsf_folder.id : nil, :dmsf_file_id => @file.id, :type => 'link_to'),
|
||||
:title => l(:title_create_link),
|
||||
:class => 'icon dmsf_icon-link') %>
|
||||
<%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(:id => @file),
|
||||
:title => l(:title_copy), :class => 'icon icon-copy') %>
|
||||
<%= delete_link(dmsf_file_path(:id => @file, :details => true)) if @file_delete_allowed %>
|
||||
<% else %>
|
||||
<% if User.current.allowed_to?(:force_file_unlock, @project) %>
|
||||
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%>
|
||||
<% end %>
|
||||
<% elsif (!@file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) %>
|
||||
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
|
||||
:title => l(:title_unlock_file), :class => 'icon icon-unlock') %>
|
||||
<% end %>
|
||||
<%= link_to(l(:label_link_to),
|
||||
new_dmsf_link_path(:project_id => @project.id,
|
||||
:dmsf_folder_id => @file.dmsf_folder ? @file.dmsf_folder.id : nil,
|
||||
:dmsf_file_id => @file.id,
|
||||
:type => 'link_to'),
|
||||
:title => l(:title_create_link),
|
||||
:class => 'icon icon-link') %>
|
||||
<%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(:id => @file),
|
||||
:title => l(:title_copy), :class => 'icon icon-copy') %>
|
||||
<% if !@file.locked? && @file_delete_allowed %>
|
||||
<%= delete_link(dmsf_file_path(:id => @file, :details => true)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -79,20 +81,16 @@
|
||||
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||
<div class="dataTables_lenght">
|
||||
<div class="dmsf_controls" style="float: right">
|
||||
<%= link_to_function '', "$('#revision_access-#{revision.id}').toggle()",
|
||||
:title => l(:title_download_entries),
|
||||
:class => 'icon icon-downloads'
|
||||
%>
|
||||
<%= link_to '', view_dmsf_file_path(@file, :download => revision),
|
||||
:title => l(:title_title_version_version_download, :title => h(revision.title), :version => revision.version),
|
||||
:class => 'icon icon-download'
|
||||
%>
|
||||
<% if @file_delete_allowed && !@file.locked? && (@file.dmsf_file_revisions.visible.count > 1) %>
|
||||
<%= link_to '', delete_revision_path(revision),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:title_delete_revision),
|
||||
:class => 'icon icon-delete' %>
|
||||
<% end %>
|
||||
<%= link_to_function image_tag('rev_downloads.png', :plugin => 'redmine_dmsf'),
|
||||
"$('#revision_access-#{revision.id}').toggle()",
|
||||
:title => l(:title_download_entries) %>
|
||||
<%= link_to image_tag('rev_download.png', :plugin => 'redmine_dmsf'),
|
||||
view_dmsf_file_path(@file, :download => revision),
|
||||
:title => l(:title_title_version_version_download, :title => h(revision.title), :version => revision.version) %>
|
||||
<%= link_to image_tag('rev_delete.png', :plugin => 'redmine_dmsf'),
|
||||
delete_revision_path(revision),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:title_delete_revision) if @file_delete_allowed && (@file.dmsf_file_revisions.visible.count > 1) %>
|
||||
</div>
|
||||
<i><%= l(:info_revision, :rev => revision.id) %></i>
|
||||
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
|
||||
@ -103,61 +101,64 @@
|
||||
<div class="attributes dmsf_revision_inner_box">
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_title)) %>
|
||||
<%= h(revision.title) %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_title), :class => 'label' %>
|
||||
<%= content_tag :div, h(revision.title), :class => 'value' %>
|
||||
</div>
|
||||
<% if revision.description.present? %>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_description)) %>
|
||||
<div class="wiki">
|
||||
<%= textilizable(revision.description) %>
|
||||
</div>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_description), :class => 'label' %>
|
||||
<%= content_tag :div, textilizable(revision.description), :class => 'wiki, value' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_dmsf_version)) %>
|
||||
<%= revision.major_version %>.<%= revision.minor_version %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_size)) %>
|
||||
<%= number_to_human_size(revision.size) %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_dmsf_version), :class => 'label' %>
|
||||
<%= content_tag :div, "#{revision.major_version}.#{revision.minor_version}", :class => 'value' %>
|
||||
</div>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_size), :class => 'label' %>
|
||||
<%= content_tag :div, number_to_human_size(revision.size), :class => 'value' %>
|
||||
</div>
|
||||
<% wf = DmsfWorkflow.find_by_id(revision.dmsf_workflow_id) %>
|
||||
<% if wf %>
|
||||
<p>
|
||||
<%= label_tag('', l(:link_workflow)) %>
|
||||
<%= "#{wf.name} - " %>
|
||||
<%= link_to(revision.workflow_str(false),
|
||||
log_dmsf_workflow_path(:project_id => @project.id,
|
||||
:id => wf.id, :dmsf_file_revision_id => revision.id),
|
||||
:title => revision.workflow_tooltip,
|
||||
:remote => true) %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_workflow), :class => 'label' %>
|
||||
<div class="value">
|
||||
<%= "#{wf.name} - " %>
|
||||
<%= link_to(revision.workflow_str(false),
|
||||
log_dmsf_workflow_path(:project_id => @project.id,
|
||||
:id => wf.id, :dmsf_file_revision_id => revision.id),
|
||||
:title => revision.workflow_tooltip,
|
||||
:remote => true) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if revision.comment.present? %>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_comment)) %>
|
||||
<div class="wiki">
|
||||
<%= textilizable(revision.comment) %>
|
||||
</div>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_comment), :class => 'label' %>
|
||||
<%= content_tag :div, textilizable(revision.comment), :class => 'value wiki' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_file)) %>
|
||||
<%= (h("#{revision.dmsf_file.dmsf_folder.dmsf_path_str}/")) if revision.dmsf_file.dmsf_folder %><%= h(revision.name) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_mime)) %>
|
||||
<%= h(revision.mime_type) %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_file), :class => 'label' %>
|
||||
<div class="value">
|
||||
<% if revision.dmsf_file.dmsf_folder %>
|
||||
<%= (h("#{revision.dmsf_file.dmsf_folder.dmsf_path_str}/")) %>
|
||||
<% end %>
|
||||
<%= h(revision.name) %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, l(:label_mime), :class => 'label' %>
|
||||
<%= content_tag :div, revision.mime_type, :class => 'value' %>
|
||||
</div>
|
||||
<% if revision.digest.present? %>
|
||||
<p>
|
||||
<%= label_tag('', 'MD5') %>
|
||||
<%= revision.digest %>
|
||||
</p>
|
||||
<div class="status attribute">
|
||||
<%= content_tag :div, 'MD5', :class => 'label' %>
|
||||
<%= content_tag :div, revision.digest, :class => 'value wiki' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render 'dmsf/custom_fields', :object => revision %>
|
||||
</div>
|
||||
@ -173,6 +174,18 @@
|
||||
<span class="pagination"><%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %></span>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('a.delete-revision').click(function(event) {
|
||||
if(!window.confirm('<%= l(:text_are_you_sure) %>')) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('a.delete-entry').click(function(event) {
|
||||
if(!window.confirm('<%= l(:text_are_you_sure) %>')) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('#file_upload').change(function() {
|
||||
if($("input[name='version']:checked").val() == '0') {
|
||||
$('#fileMinorVersionRadio').prop('checked', true);
|
||||
@ -198,7 +211,6 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<% if @revision.valid? && @file.valid? %>
|
||||
<script type="text/javascript">
|
||||
$('#newRevisionFormContentToggle').text('[+]');
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
}
|
||||
|
||||
.dmsf_workflow {
|
||||
font-size: 0.8em;
|
||||
/*font-size: 0.8em;*/
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@ -132,6 +132,13 @@
|
||||
|
||||
.dmsf_revision_inner_box {
|
||||
border: 1px solid #e4e4e4;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
div.dmsf_revision_inner_box .attribute .label {
|
||||
font-weight:bold;
|
||||
float: left;
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
.dmsf_id_box {
|
||||
@ -164,13 +171,11 @@
|
||||
}
|
||||
|
||||
/* Command icons */
|
||||
.icon-wf-none { background-image: url(../images/none.png); }
|
||||
.icon-wf-waiting { background-image: url(../images/waiting_for_approval.png); }
|
||||
.icon-wf-assigned { background-image: url(../images/assigned.png); }
|
||||
.icon-delete { background-image: url(../images/rev_delete.png); }
|
||||
.icon-download { background-image: url(../images/rev_download.png); }
|
||||
.icon-downloads { background-image: url(../images/rev_downloads.png); }
|
||||
.icon-link { background-image: url(../../../images/link.png); }
|
||||
.dmsf_icon-link { background-image: url(../images/link.png); }
|
||||
.dmsf_icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; }
|
||||
.dmsf_icon-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; }
|
||||
.dmsf_icon-lock { background-image: url(../images/lock.png); }
|
||||
.dmsf_icon-unlock { background-image: url(../images/unlock.png); }
|
||||
|
||||
/* File types */
|
||||
.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); }
|
||||
@ -201,7 +206,7 @@
|
||||
|
||||
.dmsf_gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-java { background-image: url(../images/filetypes/java_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-java { background-image: url(../images/files/filetypes/java_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); }
|
||||
.dmsf_gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); }
|
||||
@ -279,3 +284,9 @@
|
||||
#dmsf_attachments_fields .ajax-waiting input.filename {background:url(../../../images/hourglass.png) no-repeat 0px 50%;}
|
||||
#dmsf_attachments_fields .ajax-loading input.filename {background:url(../../../images/loading.gif) no-repeat 0px 50%;}
|
||||
#dmsf_attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
|
||||
|
||||
/* DMSF details */
|
||||
.dmsf_properties{
|
||||
vertical-align: middle;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user