Location: PHPKode > projects > Gallery2flickr > Gallery2Flickr/templates/FlickrImportSet.tpl
{*
 * Gallery2Flickr
 *
 * A bridge between your gallery2 installation and flickr.com
 *
 * File:       FlickrImport.tpl
 *
 *             Template for the flickr photo import.
 *
 * Copyright:
 *             (c) 2006 - 2008 hide@address.com
 *             Distributed under the terms of the GNU General Public License v2
 *
 * Author(s):
 *             Gunnar Wrobel <hide@address.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
 * 02110-1301, USA.
 *
 * (Gallery2Flickr is a module for Gallery2 - a web based photo album
 *  viewer and editor - Copyright for Gallery2: (C) 2000-2008 Bharat
 *  Mediratta)
 *
 * $Id: FlickrImportSet.tpl 10 2008-01-18 09:39:31Z luciferc $
 *
 *}
<?xml version="1.0" encoding="utf-8"?>

<div class="gbBlock gcBackground1">
  <h2> 
  {g->text text="Flickr Set Import"} 
  </h2>
</div>

{if isset($status.imported)}
<div class="gbBlock">
  <h2 class="giSuccess">
    {g->text text="Successfully imported the image!"}
  </h2>
</div>

<hr/>
{/if}

<div class="gbBlock">
  <h3>Import</h3>
  The album you chose for this action was: <b>{$Flickr.item.title|default:$Flickr.item.pathComponent}</b>
</div>

<hr/>

<div class="gbBlock">
  <h3>Set</h3>
  The set you chose to import was: 
  <b>
  {if isset($Flickr.uid)}
    <a href="{$Flickr.uid.photosurl}sets/{$Flickr.set.id}">{$Flickr.set.title}</a>
  {else}
    {$Flickr.set.title}
  {/if}
  </b>
  <br />
  Owner of this set: 
  <b>
    <a href="{$Flickr.uid.photosurl}">
      {$Flickr.uid.username|default:images}
    </a> 
    (Profile: 
    <a href="{$Flickr.uid.profileurl}">
      {$Flickr.uid.realname|default:profile}
    </a>
    )
  </b>
</div>

<hr/>

<div class="gbBlock">
  <h3>Images</h3>
  {if empty($Flickr.photos)}
  There are no photos in this flickr set.
  {else}
  <form action="{g->url}" method="post">
    <table class="gbDataTable"  border="1">
      {assign var="childrenInColumnCount" value=0}
      <tr>
        {foreach from=$Flickr.photos.photo item=photo}
          {if ($childrenInColumnCount == 4)}
            </tr>
            <tr>
            {assign var="childrenInColumnCount" value=0}
          {/if}
          {assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}
          <td style="text-align:center;width:25%;">
	    <div style="height:103px;margin-top:5px;">
            {if isset($Flickr.uid)}
              <a href="{$Flickr.uid.photosurl}{$photo.id}"><img src="{$photo.thumb}" alt="{$photo.title}"/></a>
            {else}
	      <img src="{$photo.thumb}" alt="{$photo.title}"/>
            {/if}
            </div>
	    <br/>	  
	    <div style="margin-bottom:3px;">
            <b>
              {if isset($Flickr.uid)}
                <a href="{$Flickr.uid.photosurl}{$photo.id}">{$photo.title}</a>
              {else}
	        {$photo.title}
              {/if}
	    </b>
	    </div>
	    <br/>
	    <div style="margin-bottom:10px;">
            {assign var="pid" value=$photo.id}
            <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][import][$pid]"}" value="{g->text text="Import"}"/>
 	    </div>
          </td>
        {/foreach}
      </tr>
    </table>
    <div>
      {g->hiddenFormVars}
      <input type="hidden" name="{g->formVar var="controller"}" value="Gallery2Flickr.FlickrImportSet"/>
      <input type="hidden" name="{g->formVar var="form[formName]"}" value="{$form.formName}"/>
      <input type="hidden" name="{g->formVar var="itemId"}" value="{$Flickr.item.id}"/>
      <input type="hidden" name="{g->formVar var="form[sid]"}" value="{$Flickr.sid}"/>
    </div>
  </form>
  {/if}
</div>

<div class="block-core-GuestPreview gbBlock">
  <a href="http://gunnarwrobel.de/projects/Gallery2Flickr.html">Gallery2Flickr</a> &copy; 2006 - 2008 <a href="http://www.pardus.de">hide@address.com</a> (Author: <a href="http://gunnarwrobel.de">Gunnar Wrobel</a>)
</div>
Return current item: Gallery2flickr