Commit 711552ab560c03efb354b7de04ae5d19a8d8f3e9
1 parent
f57b4a6a
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Dspace Server Crud working, needs CSS improvement
Showing
2 changed files
with
6 additions
and
18 deletions
Show diff stats
plugins/virtuoso/views/virtuoso_plugin_admin/_server_list_item.html.erb
| 1 | 1 | <li> |
| 2 | 2 | <ul class="link-list-row"> |
| 3 | 3 | <li> |
| 4 | - <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', dspace_uri[:dspace_uri], :class => 'link-name', :maxlength => 40 %> | |
| 4 | + <% value = server_list_item[:dspace_uri] if server_list_item %> | |
| 5 | + <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', value, { :class => 'link-name', :maxlength => 40 } %> | |
| 5 | 6 | </li> |
| 6 | 7 | <li> |
| 7 | 8 | <%= button_without_text(:delete, _('Delete'), "#" , :class=>"delete-server-list-row") %> | ... | ... |
plugins/virtuoso/views/virtuoso_plugin_admin/index.html.erb
| 1 | 1 | <%= javascript_include_tag '/plugins/virtuoso/edit-server-list' %> |
| 2 | 2 | |
| 3 | -<h1><%= _('Virtuoso settings')%></h1> | |
| 3 | +<h1><%= _('Virtuoso settings') %></h1> | |
| 4 | 4 | |
| 5 | 5 | <%= form_for(:settings) do |f| %> |
| 6 | 6 | |
| ... | ... | @@ -8,37 +8,24 @@ |
| 8 | 8 | <%= labelled_form_field _('Virtuoso URL:'), f.text_field(:virtuoso_uri) %> |
| 9 | 9 | <%= labelled_form_field _('Virtuoso Username:'), f.text_field(:virtuoso_username) %> |
| 10 | 10 | <%= labelled_form_field _('Virtuoso Password:'), f.password_field(:virtuoso_password) %> |
| 11 | - <%#= labelled_form_field _('DSpace URL:'), f.text_field(:dspace_uri) %> | |
| 12 | 11 | </strong> |
| 13 | 12 | |
| 14 | - | |
| 15 | -<!-- Iníco bloco link original --> | |
| 16 | -<% raise @settings[:settings].to_yaml %> | |
| 17 | - | |
| 18 | 13 | <strong><%= _('Dspace Servers') %></strong> |
| 19 | 14 | <div id='edit-server-list-block'> |
| 20 | 15 | <ul class='link-list-header'> |
| 21 | 16 | <li class='link-list-name'><%= _('DSpace URL') %></li> |
| 22 | 17 | </ul> |
| 23 | 18 | <ul id="dropable-server-list"> |
| 24 | - <% for dspace_uri in @settings[:dspace_servers] do %> | |
| 25 | - <%= render :partial => 'server_list_item', :locals => {:dspace_uri => dspace_uri} %> | |
| 26 | - <% end %> | |
| 19 | + <%= render :partial => 'server_list_item', :collection=>@settings.dspace_servers %> | |
| 27 | 20 | </ul> |
| 28 | - | |
| 29 | 21 | <div id="new-template"> |
| 30 | 22 | <% template_server = {'icon' => 'ok'} %> |
| 31 | - <%= render :partial => 'server_list_item', :locals => {:server => {} } %> | |
| 23 | + <%= render :partial => 'server_list_item', :locals => {:dspace_uri => "http://" } %> | |
| 32 | 24 | </div> |
| 33 | 25 | </div> |
| 34 | 26 | |
| 35 | 27 | <%= link_to_function(_('New Dspace Server'), 'add_new_server();', :class => 'button icon-add with-text') %> |
| 36 | 28 | |
| 37 | - | |
| 38 | -<!-- FIm bloco link original --> | |
| 39 | - | |
| 40 | - | |
| 41 | - | |
| 42 | 29 | <% button_bar do %> |
| 43 | 30 | <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> |
| 44 | 31 | <% end %> |
| ... | ... | @@ -75,4 +62,4 @@ |
| 75 | 62 | <%= button :edit, _('Triple management'), :action => :triple_management %> |
| 76 | 63 | <%= button :edit, _('Custom Queries'), :action => :index, :controller => 'virtuoso_plugin_custom_queries' %> |
| 77 | 64 | </div> |
| 78 | 65 | -</div> |
| 66 | +</div> | |
| 79 | 67 | \ No newline at end of file | ... | ... |