Author: andre
Date: 2009-08-13 21:40:53 +0200 (Thu, 13 Aug 2009)
New Revision: 37796

Modified:
   openimages/trunk/src/main/webapp/WEB-INF/tags/oip/search.tagx
   openimages/trunk/src/main/webapp/media.jspx
   openimages/trunk/src/main/webapp/mediafragment.jspx
   openimages/trunk/src/main/webapp/player/player.jspx
   openimages/trunk/src/main/webapp/style/css/framework.css
   openimages/trunk/src/main/webapp/style/css/main.css
   openimages/trunk/src/main/webapp/style/css/specific-styles.css
Log:
added field date to sort upon in advanced search, design issues

Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/search.tagx
===================================================================
--- openimages/trunk/src/main/webapp/WEB-INF/tags/oip/search.tagx       
2009-08-13 19:31:21 UTC (rev 37795)
+++ openimages/trunk/src/main/webapp/WEB-INF/tags/oip/search.tagx       
2009-08-13 19:40:53 UTC (rev 37796)
@@ -16,6 +16,7 @@
     <mm:import externid="user" />
     <mm:import externid="source" />
     <mm:import externid="date" />
+    <mm:import externid="length" />
     <mm:import externid="uploaded" />
     <mm:import externid="_searchlang"></mm:import>
     <mm:import externid="license" />
@@ -41,15 +42,46 @@
      <c:if test="${advanced eq true}">
        <fieldset class="advanced">
 
-         <label for="user">User</label>
+         <label for="user"><fmt:message key="media.user" /></label>
          <input name="user" id="user" value="${user}" type="text" />
 
-         <label for="source">Source</label>
+         <label for="source"><fmt:message key="media.source" /></label>
          <input name="source" id="source" value="${source}" type="text" />
-
-         <label for="uploaded">Uploaded</label>
+<!--
+         <c:set var="label_date"><fmt:message key="media.date" /></c:set>
+         <label for="date" class="hidden"><fmt:message key="media.date" 
/></label>
+         <select id="date" name="date">
+           <option label="${label_date}" value="">${label_date}</option>
+           <c:choose>
+             <c:when test="${date eq 'today'}">
+               <option label="Today" value="today" 
selected="selected">Today</option>
+             </c:when>
+             <c:otherwise>
+               <option label="Today" value="today">Today</option>
+             </c:otherwise>
+           </c:choose>
+           <c:choose>
+             <c:when test="${date eq 'week'}">
+               <option label="Last week" value="week" selected="selected">Last 
week</option>
+             </c:when>
+             <c:otherwise>
+               <option label="Last week" value="week">Last week</option>
+             </c:otherwise>
+           </c:choose>
+           <c:choose>
+             <c:when test="${date eq 'month'}">
+               <option label="Last month" value="month" 
selected="selected">Last month</option>
+             </c:when>
+             <c:otherwise>
+               <option label="Last month" value="month">Last month</option>
+             </c:otherwise>
+           </c:choose>
+         </select>
+-->         
+         <c:set var="label_uploaded"><fmt:message key="media.uploaded" 
/></c:set>
+         <label for="uploaded" class="hidden"><fmt:message 
key="media.uploaded" /></label>
          <select id="uploaded" name="uploaded">
-           <option label="Uploaded" value="">Uploaded</option>
+           <option label="${label_uploaded}" 
value="">${label_uploaded}</option>
            <c:choose>
              <c:when test="${uploaded eq 'today'}">
                <option label="Today" value="today" 
selected="selected">Today</option>
@@ -75,10 +107,11 @@
              </c:otherwise>
            </c:choose>
          </select>
-
-         <label for="length">Length</label>
+        
+         <c:set var="label_length"><fmt:message key="media.length" /></c:set>
+         <label for="length" class="hidden"><fmt:message key="media.length" 
/></label>
          <select id="length" name="length">
-           <option label="Length" value="">Length</option>
+           <option label="${label_length}" value="">${label_length}</option>
            <c:choose>
              <c:when test="${length eq 'short'}">
                <option label="Short (&amp;lt; 2 minutes)" value="short" 
selected="selected">Short (&amp;lt; 2 minutes)</option>
@@ -105,17 +138,18 @@
            </c:choose>
          </select>
 
-         <label for="mm_searchlang">Language</label>
+         <label for="mm_searchlang" class="hidden"><fmt:message 
key="media.language" /></label>
          <mm:datatype nodemanager="articles" field="language" id="searchlang">
            <default value="" />
            <required value="false" />
          </mm:datatype>
          <mm:fieldinfo datatype="searchlang" node="" type="input" />
 
-         <label for="license">License</label>
+         <c:set var="label_license"><fmt:message key="media.license" /></c:set>
+         <label for="license" class="hidden"><fmt:message key="media.license" 
/></label>
          <mm:listnodescontainer type="licenses">
            <select id="license" name="license">
-             <option value="" label="License">License</option>
+             <option value="" 
label="${label_license}">${label_license}</option>
            <mm:listnodes>
              <c:if test="${license eq _node.number}">
                <option value="${_node.number}" label="${_node.name}" 
selected="selected">${_node.name}</option>

Modified: openimages/trunk/src/main/webapp/media.jspx
===================================================================
--- openimages/trunk/src/main/webapp/media.jspx 2009-08-13 19:31:21 UTC (rev 
37795)
+++ openimages/trunk/src/main/webapp/media.jspx 2009-08-13 19:40:53 UTC (rev 
37796)
@@ -22,9 +22,10 @@
 
       <mm:import externid="user" />
       <mm:import externid="source" />
+      <mm:import externid="date" />
       <mm:import externid="uploaded" />
       <mm:import externid="length" />
-      <mm:import externid="_language" />
+      <mm:import externid="_searchlang" />
       <mm:import externid="license" />
 
       <mm:import id="index">media</mm:import>
@@ -49,7 +50,7 @@
           </c:otherwise>
         </c:choose>
 
-        <c:if test="${!empty _language}"><c:set var="searched" 
value="advanced" /></c:if>
+        <c:if test="${!empty _searchlang}"><c:set var="searched" 
value="advanced" /></c:if>
         <c:if test="${!empty user}"><c:set var="searched" value="advanced" 
/></c:if>
         <c:if test="${!empty source}"><c:set var="searched" value="advanced" 
/></c:if>
         <c:if test="${!empty license}"><c:set var="searched" value="advanced" 
/></c:if>
@@ -60,6 +61,9 @@
         <mm:import id="images">${extraconstraints} otype:EQ:<mm:nodeinfo 
type="number" nodetype="imagefragments" /></mm:import>
         <mm:import id="audio">${extraconstraints} otype:EQ:<mm:nodeinfo 
type="number" nodetype="audiofragments" /></mm:import>
         <mm:import id="filter">
+          <c:if test="${!empty date and date eq 'day'}">date:LTE:<mm:time 
format="yyyyMMddHHmm" time="now - 24 hours" precision="minutes" />00</c:if>
+          <c:if test="${!empty date and date eq 'week'}">date:GTE:<mm:time 
format="yyyyMMddHHmm" time="now - 7 day"  precision="minutes" />00</c:if>
+          <c:if test="${!empty date and date eq 'month'}">date:GTE:<mm:time 
format="yyyyMMddHHmm" time="now - 30 day" precision="minutes" />00</c:if>
           <c:if test="${!empty uploaded and uploaded eq 
'day'}">created:LTE:<mm:time format="yyyyMMddHHmm" time="now - 24 hours" 
precision="minutes" />00</c:if>
           <c:if test="${!empty uploaded and uploaded eq 
'week'}">created:GTE:<mm:time format="yyyyMMddHHmm" time="now - 7 day"  
precision="minutes" />00</c:if>
           <c:if test="${!empty uploaded and uploaded eq 
'month'}">created:GTE:<mm:time format="yyyyMMddHHmm" time="now - 30 day" 
precision="minutes" />00</c:if>
@@ -68,7 +72,7 @@
           <c:if test="${!empty length and length eq 'long'}">length:GT:240000 
</c:if>
           <c:if test="${!empty user}">user:EQ:${user} </c:if>
           <c:if test="${!empty source}">source:EQ:${source} </c:if>
-          <c:if test="${!empty _language}">language:EQ:${_language} </c:if>
+          <c:if test="${!empty _searchlang}">language:EQ:${_searchlang} </c:if>
           <c:if test="${!empty license}">licensenr:EQ:${license} </c:if>
         </mm:import>
 
@@ -98,7 +102,8 @@
             referids="index,value,fields?,filter,ima...@extraconstraints" />
 
         <!-- sorting -->
-        <mm:import externid="sf"><c:if test="${empty 
q}">created</c:if></mm:import>
+        <mm:import externid="sf"><c:if test="${empty 
q}">date</c:if></mm:import>
+        <mm:import externid="d">down</mm:import>
         <mm:import externid="c">down</mm:import>
         <mm:import externid="s">down</mm:import>
         <mm:import externid="t">down</mm:import>
@@ -109,7 +114,8 @@
               <c:when test="${sf eq 'sorttitle'}">${t eq 'down' ? 'REVERSE:' : 
''}${sf}</c:when>
               <c:when test="${sf eq 'source'}">${s eq 'down' ? 'REVERSE:' : 
''}${sf}</c:when>
               <c:when test="${sf eq 'user'}">${u eq 'down' ? 'REVERSE:' : 
''}${sf}</c:when>
-              <c:otherwise>${c eq 'down' ? 'REVERSE:' : ''}${sf}</c:otherwise>
+              <c:when test="${sf eq 'uploaded'}">${c eq 'down' ? 'REVERSE:' : 
''}${sf}</c:when>
+              <c:otherwise>${d eq 'down' ? 'REVERSE:' : ''}${sf}</c:otherwise>
             </c:choose>
           </mm:import>
         </c:if>
@@ -127,8 +133,9 @@
             
referids="index,value,offset,max,fields?,sortfields?,filter,ima...@extraconstraints"
 />
 
         <p>
-          <c:if test="${!empty q}">Searched  with 
<strong>${value}</strong>:</c:if>
-          ${total} found.
+          <c:if test="${!empty q}">
+            <fmt:message key="search.searched_with" /> 
<strong>${value}</strong>
+          </c:if>
         </p>
 
         <div id="tabs">
@@ -139,7 +146,7 @@
             <li class="hidden"><a href="#t_thumbs"><span>Thumbs 
(${total})</span></a></li>
           </ul>
 
-          <mm:url absolute="true" referids="q" id="baseurl" write="false" />
+          <mm:url absolute="true" 
referids="q,user?,source?,date?,uploaded?,length?,_searchlang?,license?" 
id="baseurl" write="false" />
           <div id="t_video">
             <oip:medialist list="${results_video}" />
             <p class="pager">
@@ -193,6 +200,13 @@
             </li>
             <li>
               <mm:link referid="baseurl">
+                <mm:param name="sf">date</mm:param>
+                <mm:param name="d">${d eq 'up' ? 'down' : 'up'}</mm:param>
+                <a class="${sf eq 'date' ? d : ''}" href="${_}">Publication 
date</a>
+              </mm:link>
+            </li>
+            <li>
+              <mm:link referid="baseurl">
                 <mm:param name="sf">created</mm:param>
                 <mm:param name="c">${c eq 'up' ? 'down' : 'up'}</mm:param>
                 <a class="${sf eq 'created' ? c : ''}" href="${_}">Date 
uploaded</a>

Modified: openimages/trunk/src/main/webapp/mediafragment.jspx
===================================================================
--- openimages/trunk/src/main/webapp/mediafragment.jspx 2009-08-13 19:31:21 UTC 
(rev 37795)
+++ openimages/trunk/src/main/webapp/mediafragment.jspx 2009-08-13 19:40:53 UTC 
(rev 37796)
@@ -241,7 +241,7 @@
                 </mm:node>
               </c:forEach>
               <c:if test="${empty hits}">
-                <p>This item has no tags and therefore not any related items 
yet.</p>
+                <p>This item has no tags and therefore no related items 
yet.</p>
               </c:if>
             </mm:function>
           </mm:functioncontainer>

Modified: openimages/trunk/src/main/webapp/player/player.jspx
===================================================================
--- openimages/trunk/src/main/webapp/player/player.jspx 2009-08-13 19:31:21 UTC 
(rev 37795)
+++ openimages/trunk/src/main/webapp/player/player.jspx 2009-08-13 19:40:53 UTC 
(rev 37796)
@@ -22,7 +22,7 @@
     <jsp:attribute name="body">
 
       <div class="main-column">
-        <mm:node number="552">
+        <mm:node number="498">
 
   <mm:import id="mediaurls">
     <mm:listfunction name="filteredurls">
@@ -44,7 +44,7 @@
         <source src="${mm:escape('text/xml', _.URL)}" 
type="${_.format.mimeType}; codecs=${mm:escape('lowercase', 
_.codec)}"><jsp:text> </jsp:text></source>
       </c:if>
     </mm:listfunction -->
-    <source src="http://grgrijze.toly.net:8080/oip/player/presto.mp4"; 
type="video/mp4" ><jsp:text> </jsp:text></source>
+    <source src="http://grgrijze.toly.net:8080/oip/player/543.518.presto.mp4"; 
type="video/mp4" ><jsp:text> </jsp:text></source>
     <!-- source 
src="http://openbeelden1.tuxic.nl/beta/files//011049.848.WEEKNUMMER303-HRE0000CC8E.ogv";
 type="video/ogg" ><jsp:text> </jsp:text></source -->
           <p>
             Your need a browser that understands the html5 video tag to play 
this media item.

Modified: openimages/trunk/src/main/webapp/style/css/framework.css
===================================================================
--- openimages/trunk/src/main/webapp/style/css/framework.css    2009-08-13 
19:31:21 UTC (rev 37795)
+++ openimages/trunk/src/main/webapp/style/css/framework.css    2009-08-13 
19:40:53 UTC (rev 37796)
@@ -57,7 +57,7 @@
 {
        position: relative;
        top: 0;
-       left: 340px;
+       left: 335px;
        width: 640px;
        height: 32px;
        border-bottom: 3px #666 dotted;
@@ -103,7 +103,6 @@
        white-space: nowrap;
        word-spacing: 2px;
        padding-right: 8px;
-       text-transform: lowercase;
 }
 
 
@@ -118,12 +117,6 @@
 
 #menu ul.meta li a { color: #c00; }
 
-#menu select
-{
-       padding: 2px;
-       font-size: 0.85em;
-}
-
 #footer
 {
        width: 100%;

Modified: openimages/trunk/src/main/webapp/style/css/main.css
===================================================================
--- openimages/trunk/src/main/webapp/style/css/main.css 2009-08-13 19:31:21 UTC 
(rev 37795)
+++ openimages/trunk/src/main/webapp/style/css/main.css 2009-08-13 19:40:53 UTC 
(rev 37796)
@@ -15,7 +15,6 @@
 {
        padding: 0;
        margin: 0;
-       font-family: Helvetica, sans-serif;
 }
 
 html
@@ -27,6 +26,7 @@
 body
 {
        line-height: 1.5em;
+       font-family: Helvetica, sans-serif;
        font-size: 0.85em;
 }
 
@@ -164,21 +164,31 @@
        margin-bottom: 1em;
 }
 
-input, select
+input
 {
        padding: 3px;
        margin: 0 0 6px 0;
        color: #555;
+       width: 312px;
+       font-size: 1em;
        border: 1px solid #cfcfcf;
 }
 
-input
+/*
+select
 {
-       width: 312px;
-       font-size: 1em;
+       margin-bottom: 6px;
+       padding: 2px;
 }
-/*select option { margin: 4px 0; }*/
 
+select option
+{
+       padding: 2px;
+       margin: 0;
+}
+*/
+
+
 textarea
 {
        width: 314px;

Modified: openimages/trunk/src/main/webapp/style/css/specific-styles.css
===================================================================
--- openimages/trunk/src/main/webapp/style/css/specific-styles.css      
2009-08-13 19:31:21 UTC (rev 37795)
+++ openimages/trunk/src/main/webapp/style/css/specific-styles.css      
2009-08-13 19:40:53 UTC (rev 37796)
@@ -388,18 +388,20 @@
 
 /* search form */
 form#search { width: 250px; }
-form#search input, form#search select
+form#search fieldset { width: 256px; }
+form#search label { text-transform: lowercase; }
+form#search input
 {
        width: 250px;
        padding: 2px;
        margin: 0 0 8px 0;
-       font-size: 1em;
 }
 
 form#search select
 {
        width: 100%;
-       font-size: 0.95em;
+       margin-bottom: 8px;
+       text-transform: lowercase;
 }
 
 form#search input.submit

_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to