myexperiment-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Myexperiment-discuss] Include template file


From: Linde, A.E.
Subject: [Myexperiment-discuss] Include template file
Date: Thu, 6 Nov 2008 03:06:52 +0000

Hi all, in app/views/workflows/index.rhtml I am including a template which, when clicking the link I’ve added alongside each displayed workflow, gets loaded with workflow details in a shadowbox and displayed to the user to enable them to post a SKUA claim. In index.rhtml I have got:

<div id="skuaTemplate" style="display:none">    <div style="font-family:Verdana;">            <div style="padding-bottom:10px;"></div>            <form id="frmClaim" style="font-size:9pt;" method="POST" action=""                <div style="padding-bottom:7px;">                <div style="padding-bottom:3px;">                    <label style="margin-left:10px; float:left; width:80px;">Object type:</label>                    <input id="txtType" style="margin-left:3px; width:90px" type="text" value="#{objectType}" disabled />                    <label style="margin-left:10px;">Title:</label>                    <input id="txtTitle" style="margin-left:3px; width:350px" type="text" value="#{title}" disabled /> ...            </form>    </div> </div>
In all, 70 lines, which seems to unbalance the file and be against the whole rails approach: is there a command I can stick between the first <div> and last </div> which would just pull in the contents of a file (stored, say, in /app/public/templates)? eg:

<div id="skuaTemplate" style="display:none">
  #include templates/workflow.tmpl
</div>

Thanks,
Tony.

--
Tony Linde
Project Manager
Department of Physics & Astronomy
University of Leicester

reply via email to

[Prev in Thread] Current Thread [Next in Thread]