Location: PHPKode > projects > Gallery2flickr > Gallery2Flickr/templates/FlickrImport.tpl
{*
 * Gallery2Flickr
 *
 * A bridge between your gallery2 installation and flickr.com
 *
 * File:       FlickrImport.tpl
 *
 *             Template for the flickr set 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: FlickrImport.tpl 10 2008-01-18 09:39:31Z luciferc $
 *
 *}
<?xml version="1.0" encoding="utf-8"?>

<form action="{g->url}" method="post">
<div class="gbBlock gcBackground1">
  <h2> 
  {g->text text="Flickr Import"} 
  </h2>
</div>

{if isset($status.imported)}
<div class="gbBlock">
  <h2 class="giSuccess">
    {g->text text="Successfully imported the set!"}
  </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>Search</h3>
	  <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][search]"}" value="{g->text text="Import from search"}"/>
</div>

<hr/>

<div class="gbBlock">
  <h3>Select different user</h3>
  Switch to user: 
	  <input 
	      type="text" 
	      name="{g->formVar var="form[switch]"}" value=""/>
	  <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][switch]"}" value="{g->text text="Search user by name"}"/>
</div>

<hr/>

<div class="gbBlock">
  <h3>Select images</h3>
</div>
{if isset($Flickr.uid)}
<div class="gbBlock">
  Sets from user: <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>
{else}
<div class="gbBlock">
  <b>Your sets:</b>
</div>
{/if}
<div class="gbBlock">
  {if empty($Flickr.sets)}
  There are no sets in your flickr account.
  {else}
    <table class="gbDataTable">
      {foreach from=$Flickr.sets.photoset item=fset}
      <tr>
	<td>
	  <b>
            {if isset($Flickr.uid)}
              <a href="{$Flickr.uid.photosurl}sets/{$fset.id}">{$fset.title}</a>
            {else}
              {$fset.title}
            {/if}
	  </b>
	</td>
	<td>
	  ({$fset.photos} Photos)
	</td>
	{assign var="setid" value=$fset.id}
	<td>
	  <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][import][$setid]"}" value="{g->text text="Import image from set"}"/>
	</td>
	<td>
	  <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][importset][$setid]"}" value="{g->text text="Import set"}"/>
	</td>
	<td>
	  <input 
	      type="submit" 
	      class="inputTypeSubmit"
	      name="{g->formVar var="form[action][updateset][$setid]"}" value="{g->text text="Update set"}"/>
	</td>
      </tr>
      {/foreach}
      {/if}
    </table>
    <div>
      {g->hiddenFormVars}
      <input type="hidden" name="{g->formVar var="controller"}" value="Gallery2Flickr.FlickrImport"/>
      <input type="hidden" name="{g->formVar var="form[formName]"}" value="{$form.formName}"/>
      <input type="hidden" name="{g->formVar var="itemId"}" value="{$Flickr.item.id}"/>
    </div>
</div>
</form>

<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