Changeset 383 for trunk/templates


Ignore:
Timestamp:
08/13/12 17:26:35 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Checkpoint adding location support to UI. See #10.

  • Add location entries to new domain, record list, and record add/edit templates
  • Add UI sub to fill location dropdown on new domain and record add/edit templates
  • Fix thinko in initial setting of location_view permission
  • Handle display properly if user does not have location_view permission
  • Add DB-interfacing subs in DNSDB.pm to get the default location set on a zone, and to return a list of locations suitable for a UI dropdown
Location:
trunk/templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/newdomain.tmpl

    r310 r383  
    3232                <td>Make domain active on next DNS propagation</td><td><input type="checkbox" name="makeactive"<TMPL_UNLESS addinactive> checked="checked"</TMPL_UNLESS> /></td>
    3333        </tr>
     34<TMPL_IF location_view>
     35        <tr class="datalinelight">
     36                <td>Default location/view:</td>
     37                <td><select name="defloc">
     38                <option value="">(None/public)</option>
     39<TMPL_LOOP name=loclist>                <option value="<TMPL_VAR NAME=loc>"<TMPL_IF selected> selected="selected"</TMPL_IF>><TMPL_VAR NAME=locname></option>
     40</TMPL_LOOP>
     41                </select></td>
     42        </tr>
     43</TMPL_IF>
    3444        <tr><td colspan="2" class="tblsubmit"><input type="submit" value="Add domain" /></td></tr>
    3545    </table>
  • trunk/templates/reclist.tmpl

    r379 r383  
    6262<tr class="row<TMPL_VAR NAME=row>">
    6363<TMPL_IF fwdzone>
    64         <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_ELSE><TMPL_VAR NAME=host></TMPL_IF></td>
     64        <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=host></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=host><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
    6565        <td><TMPL_VAR NAME=type></td>
    6666        <td><TMPL_VAR NAME=val></td>
     
    6969        <td><TMPL_VAR NAME=port></td>
    7070<TMPL_ELSE>
    71         <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=val></a><TMPL_ELSE><TMPL_VAR NAME=val></TMPL_IF></td>
     71        <td><TMPL_IF record_edit><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=record&amp;parentid=<TMPL_VAR NAME=id>&amp;defrec=<TMPL_VAR NAME=defrec>&amp;revrec=<TMPL_VAR NAME=revrec>&amp;recact=edit&amp;id=<TMPL_VAR NAME=record_id>"><TMPL_VAR NAME=val></a><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF><TMPL_ELSE><TMPL_VAR NAME=val><TMPL_IF locname> (<TMPL_VAR NAME=locname>)</TMPL_IF></TMPL_IF></td>
    7272        <td><TMPL_VAR NAME=type></td>
    7373        <td><TMPL_VAR NAME=host></td>
  • trunk/templates/record.tmpl

    r271 r383  
    7070                <td><input size="7" maxlength="20" type="text" name="ttl" value="<TMPL_VAR NAME=ttl>" /></td>
    7171        </tr>
     72<TMPL_IF location_view>
     73        <tr class="datalinelight">
     74                <td>Location/view</td>
     75                <td><select name="location">
     76<TMPL_LOOP name=loclist>                <option value="<TMPL_VAR NAME=loc>"<TMPL_IF selected> selected="selected"</TMPL_IF>><TMPL_VAR NAME=locname></option>
     77</TMPL_LOOP>
     78                </select></td>
     79        </tr>
     80</TMPL_IF>
    7281        <tr class="datalinelight">
    7382                <td colspan="2" align="center"><input type="submit" value=" <TMPL_VAR NAME=todo> " /></td>
Note: See TracChangeset for help on using the changeset viewer.