Changeset 177

Show
Ignore:
Timestamp:
20-03-12 17:37:12 (2 years ago)
Author:
kostas.karasavvas@…
Message:

cleanup and minor austhetics

Location:
t2-web/trunk
Files:
1 added
8 modified

Legend:

Unmodified
Added
Removed
  • t2-web/trunk/bin/t2_webapp.rb

    r176 r177  
    99require 'myexperiment-rest' 
    1010require 'cgi' 
    11 #require "web-t2" TODO: move whole of WebT2App in lib 
    12  
     11#require "t2-web" TODO: move whole of WebT2App in lib 
     12 
     13# TODO: add constants.rb file in lib for all constants (e.g. myExp user URL, other URLs 
    1314 
    1415class WebT2App < Sinatra::Base 
     
    1920  set :port, 9494 
    2021  set :views, File.dirname(__FILE__) + '/../views' 
    21   set :public, File.dirname(__FILE__) + '/../public' 
     22  set :public_folder, File.dirname(__FILE__) + '/../public' 
    2223 
    2324  # can be used from routes and views (haml) 
     
    7778      <table class='header'> 
    7879        <tr> 
    79           <td> 
     80          <td class='left'> 
    8081            <img alt='NBIC logo' src='/images/nbic_logo.gif' /> 
    8182          </td> 
     
    8384            <table class='header-title'> 
    8485              <tr> 
    85                 <td class='header-title'>Workflow: #{@my_exp_wkf.title}</td> 
     86                <td class='header-title'>#{@my_exp_wkf.title}</td> 
    8687              </tr> 
    8788              <tr> 
    88                 <td class='right'>workflow by #{@my_exp_usr.name}</td> 
    89  
     89                <td class='right'>workflow by <a href="http://www.myexperiment.org/users/#{@my_exp_usr.id}.html" target="_blank">#{@my_exp_usr.name}</a></td> 
    9090              </tr> 
    9191            </table> 
  • t2-web/trunk/CHANGES

    r176 r177  
    11= Changes log for the Taverna via the Web Gem 
     2 
     3== Version 0.0.8 
     4* Removed "Workflow: " from form's header 
     5* Changed image for please not bullet points 
     6* Cleaned form.haml from old comments 
     7* Added footer in form.haml with acknowledgements 
     8* Made "workflow by USER" a link to point to user in myExperiment 
     9 
     10== Version 0.0.7 
     11* Updated sinatra dependency 
     12* Updated copyright year 
     13 
     14== Version 0.0.6 
     15* Initial rdoc documentation 
    216 
    317== Version 0.0.5 
  • t2-web/trunk/public/css/form.css

    r153 r177  
    3333} 
    3434 
     35table.acknowledgements { 
     36  width: 500px; 
     37  border-collapse: collapse; 
     38  /* With equal left-right margins table will be aligned in the centre */ 
     39  margin-left: auto; 
     40  margin-right: auto; 
     41  font-size: 10pt; 
     42  font-style: italic; 
     43  text-align: center; 
     44} 
     45 
    3546th.inputs { 
    3647  font-size: 120%; 
     
    4354td.inputs { 
    4455  padding: 5px; 
    45   vertical-align: top; 
     56  vertical-align: middle; 
     57} 
     58 
     59td.left { 
     60  text-align: left; 
    4661} 
    4762 
  • t2-web/trunk/public/css/tipsy.css

    r153 r177  
    11.tipsy { padding: 5px; font-size: 13px; opacity: 0.8; filter: alpha(opacity=80); background-repeat: no-repeat;  background-image: url(../images/tipsy.gif); } 
    2   .tipsy-inner { padding: 5px 8px 4px 8px; background-color: #161616; color: white; max-width: 300px; text-align: left; } 
     2  .tipsy-inner { padding: 5px 8px 4px 8px; background-color: #161616; color: white; max-width: 240px; text-align: left; } 
    33  .tipsy-inner { -moz-border-radius:3px; -webkit-border-radius:3px; } 
    44  .tipsy-north { background-position: top center; } 
  • t2-web/trunk/Rakefile

    r176 r177  
    1313spec = Gem::Specification.new do |s| 
    1414  s.name = 't2-web' 
    15   s.version = '0.0.5' 
     15  s.version = '0.0.8' 
    1616  s.extra_rdoc_files = ['README', 'LICENSE', 'CHANGES'] 
    17   s.summary = 'WS (with libs) that generates a Web UI form for a Taverna2 workflow and then enacts it to a T2 server.' 
     17  s.summary = 'Web application that generates a Web UI form for a Taverna2 workflow, given its myExperiment id, for ease of execution. The only requirement for the user is a web browser.' 
    1818  s.description = s.summary 
    1919  s.author = 'Kostas Karasavvas' 
    2020  s.email = 'kostas.karasavvas@nbic.nl' 
    2121  s.executables = ['t2_webapp.rb'] 
    22   s.files = %w(LICENSE README CHANGES Rakefile) + Dir.glob("{bin,lib,spec,public,views}/**/*") 
     22  s.files = %w(LICENSE README CHANGES Rakefile) + Dir.glob("{bin,lib,doc,spec,public,views}/**/*") 
    2323  s.require_path = "lib" 
    2424  s.bindir = "bin" 
    25   s.add_dependency 'sinatra', '~> 1.2.6' 
     25  s.add_dependency 'sinatra', '~> 1.3.0' 
    2626  s.add_dependency 'haml', '~> 3.1.2' 
    2727  s.add_dependency 'rest-client', '~> 1.6.3' 
    2828  s.add_dependency 't2-server', '~> 0.6.1' 
    29   s.add_dependency 'myexperiment-rest', '~> 0.3.0' 
     29  s.add_dependency 'myexperiment-rest', '~> 0.3.3' 
    3030end 
    3131 
  • t2-web/trunk/README

    r176 r177  
    33 
    44Authors::     Konstantinos Karasavvas 
    5 Gem Version:: 0.0.5 
     5Gem Version:: 0.0.8 
    66Contact::     mailto:kostas.karasavvas@nbic.nl 
    77Licence::     MIT (See LICENCE or http://www.opensource.org/licenses/mit-license) 
    8 Copyright::   (c) 2010 Netherlands Bioinformatics Centre, The Netherlands 
     8Copyright::   (c) 2012 Netherlands Bioinformatics Centre, The Netherlands 
    99 
    1010 
  • t2-web/trunk/views/form.haml

    r153 r177  
    1111  %body 
    1212 
    13     = generate_header_table(@my_exp_wkf) 
     13    = generate_header_table(@my_exp_wkf, @my_exp_usr) 
    1414 
    15     -# TODO: should move coding to controller and not use haml's "-" for logic inside the template!!! 
    16     -#header 
    17       %table.header 
    18         %tr 
    19           %td 
    20             %img{:src => "/images/nbic_logo.gif", :alt => "NBIC logo"} 
    21           %td 
    22             %table.header-title 
    23               %tr 
    24                 %td.header-title Workflow: #{@my_exp_wkf.title} 
    25               - if #{@my_exp_wkf.user.name} 
    26                 %tr 
    27                   %td.right workflow by #{@my_exp_wkf.user.name} 
    28           %td 
    29             %img.right{:src => "/images/lumc_logo2.png", :alt => "LUMC logo"} 
     15    -# TODO: should move coding to controller and reduce haml's "-" for logic inside the template!!! 
    3016 
    3117    %br 
     
    6046            - input_textarea_tooltip = generate_textarea_tooltip(input) 
    6147          %div{:id => "#{input.name}-upload-form-div"} 
    62             %form{:id => "#{input.name}-upload-form", :enctype => "multipart/form-data", :target => "hidden-iframe", :action => "/t2web/upload", :method => "post"} 
     48            -#%form{:id => "#{input.name}-upload-form", :enctype => "multipart/form-data", :target => "hidden-iframe", :action => "/t2web/upload", :method => "post"} 
     49            %form{:id => "#{input.name}-upload-form", :enctype => "multipart/form-data"} 
    6350              %label{:for => "#{input.name}-upload-label", :title => "#{input_label_tooltip}"} Select file for #{input.name} 
    64               %input{:type => "file", :name => "file", :onchange => "uploadFile('#{input.name}')"} 
     51              %input{:type => "file", :name => "file", :onchange => "uploadFile('#{input.name}')"}  
    6552          %div{:id => "#{input.name}-manual-group"} 
    6653            %label{:for => "#{input.name}-label", :title => "#{input_label_tooltip}"} Enter #{input.name}: 
     
    8168            = @my_exp_wkf.description 
    8269 
    83     -# %br 
    84     -# %br 
    85     -#inputs 
    86       - if @my_exp_wkf.inputs.size >=1 
    87         %table.inputs 
    88           %tr 
    89             %th.inputs 
    90               Input 
    91             %th.inputs 
    92               Description 
    93             %th.inputs 
    94               Examples 
    95           - @my_exp_wkf.inputs.each do |input| 
    96             %tr 
    97               %td.inputs 
    98                 = input.name 
    99               %td.inputs 
    100                 - if input.descriptions.size >=1 
    101                   - input.descriptions.each do |descr| 
    102                     = descr 
    103                     %br 
    104               %td.inputs 
    105                 - if input.examples.size >=1 
    106                   - input.examples.each do |ex| 
    107                     = ex 
    108                     %br 
    10970 
    11071    %br 
     
    147108        %tr 
    148109          %td.inputs 
    149             %img{:src => "/images/info.png", :alt => "Important!" } 
     110            %img{:src => "/images/bullet_go.png", :alt => "Important!" } 
    150111          %td.inputs 
    151112            Some workflows are not up-to-date or have dependencies that cannot be met by the specific Taverna server that you specified during generation of this tool. You can make sure that the workflow is valid by running it in the Taverna Workbench first to confirm that it works before running it via the Web. 
    152113        %tr 
    153114          %td.inputs 
    154             %img{:src => "/images/info.png", :alt => "Important!" } 
     115            %img{:src => "/images/bullet_go.png", :alt => "Important!" } 
    155116          %td.inputs 
    156117            There might be some repetitions in the workflow description in some of the generated workflows. This is due to a backwards compatibility issue on the myExperiment repository which keeps the old descriptions to make sure that no information is lost. 
    157118        %tr 
    158119          %td.inputs 
    159             %img{:src => "/images/info.png", :alt => "Important!" } 
     120            %img{:src => "/images/bullet_go.png", :alt => "Important!" } 
    160121          %td.inputs 
    161122            For more information on this workflow please visit the 
    162123            %a{ :href => "http://www.myExperiment.org/workflows/#{@wid}" } myExperiment website 
    163         - if #{@my_exp_wkf.user.email} 
     124        -# if #{@my_exp_wkf.user.email} 
    164125          %tr 
    165126            %td.inputs 
    166               %img{:src => "/images/info.png", :alt => "Important!" } 
     127              %img{:src => "/images/bullet_go.png", :alt => "Important!" } 
    167128            %td.inputs 
    168129              For questions/comments you can also contact the workflow creator at: 
    169               %a{ :href => "mailto:#{@my_exp_wkf.user.email}" } #{@my_exp_wkf.user.email} 
     130              %a{ :href => "mailto:#{@my_exp_usr.email}" } #{@my_exp_usr.email} 
    170131 
    171132    %br 
    172     %br 
     133 
     134    #footer 
     135      %table.acknowledgements 
     136        %tr 
     137          %td.inputs 
     138            The work to generate a web form from a Taverna workflow was based on a collaboration between NBIC, myExperiment, and myGrid. 
     139 
  • t2-web/trunk/views/results.haml

    r153 r177  
    1212          // calculate results_navigation here since helpers seem unavailable in results.js!? 
    1313          results_navigation = "#{generate_data_navigation_frame(@my_exp_wkf, @run_uuid, @wid, @wkf_version, @t2_server, true)}"; 
    14           window.frames['header'].document.write("#{generate_header_frame(@my_exp_wkf).gsub!(/\n/, "")}"); 
     14          window.frames['header'].document.write("#{generate_header_frame(@my_exp_wkf, @my_exp_usr).gsub!(/\n/, "")}"); 
    1515          window.frames['data-navigation'].document.write("#{generate_data_navigation_frame(@my_exp_wkf, @run_uuid, @wid, @wkf_version, @t2_server, false)}"); 
    1616          runStatusIntervalId = window.setInterval( "checkRunStatus('#{@t2_server}', '#{@run_uuid}')", 5000);