Project

General

Profile

« Previous | Next » 

Revision 2782

Added by sgarg almost 19 years ago

Fixed the bug in the link to view documents pending moderation. The links works now.

View differences:

lib/style/skins/esa/esa.css
346 346
      display:none;
347 347
  }
348 348

  
349
.show {
349
.showLink {
350
      cursor: pointer;
351
      cursor: hand;
350 352
      display:empty;
351 353
  }
352 354

  
lib/style/skins/esa/header.html
82 82
				login_block.innerHTML="";
83 83
                        	if(response.indexOf("public") > 0){
84 84
					login_block.innerHTML = "<a href='@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=loginform' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"ESALogin\",\"\",\"ESAHeaderSlices/RollOvers/ESALoginR.gif\",1);'><img name='ESALogin' src='ESAHeaderSlices/ESALogin.gif' width='57' height='17' border='0' alt='Login'></a>";
85
                                	//var a = document.createElement('a');
86
                                	//a.href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&stage=loginform";
87
                                	//var a_text = document.createTextNode('Login');
88
                                	//a.appendChild(a_text);
89
                                	//a.setAttribute("target","_top");
90
                                	//login_block.appendChild(a);
91 85
                        	} else {
92 86
					login_block.innerHTML = "<a href='@cgi-prefix@/register-dataset.cgi?cfg=esa&stage=logout' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"ESALogout\",\"\",\"ESAHeaderSlices/RollOvers/ESALogoutR.gif\",1);'><img name='ESALogout' src='ESAHeaderSlices/ESALogout.gif' width='57' height='17' border='0' alt='Login'></a>";
93
                                	//var a = document.createElement('a');
94
                                	//a.href="@cgi-prefix@/register-dataset.cgi?cfg=[%cfg%]&stage=logout";
95
                                	//var a_text = document.createTextNode('Logout');
96
                                	//a.appendChild(a_text)
97
                                	//a.setAttribute("target","_top");
98
				
99
					if(response.indexOf("isModerator") > 0){
100
						document.getElementById("modLink").className="show";
101
					}
102
                                	//login_block.appendChild(a);
87

  
88
					//if(response.indexOf("isModerator") > 0){
89
						document.getElementById("modLink").className="showLink";
90
					//}
103 91
	                	}
104 92
                	}
105 93
		}
......
153 141
  </tr>
154 142
</table>
155 143
<!--- TODO if user then have the link to view all the documents which have been inserted already. If not user then view all documents which have not been moderated yet -->
156
<form id="modSearch" name="modSearch" action="@servlet-path@" method="post">
144
<form id="modSearch" name="modSearch" action="@servlet-path@" method="post" target="_top">
157 145
       <input type="hidden" name="action" value="squery"/>
158 146
       <input type="hidden" name="qformat" value="esa"/>
159 147
       <input type="hidden" name="enableediting" value="true"/>
160 148
       <input type="hidden" name="query" value="<pathquery><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator='INTERSECT'><queryterm searchmode='not-contains' casesensitive='false'><value>public</value><pathexpr>dataset/access/allow/principal</pathexpr></queryterm></querygroup></pathquery>"/>
161
<p><a id="modLink" class="hide" href='javascript:document.getElementById("modSearch").submit();' target="_top">View Undocumented Documents</a></p>
149
<p><a id="modLink" class="hide" onClick="this.parentNode.parentNode.submit();">View documents pending moderation</a></p>
162 150
</form>
163 151
<script>
164 152
MM_preloadImages('ESAHeaderSlices/ESAHome2_f2.gif','ESAHeaderSlices/RollOvers/ESAHomeR.gif','ESAHeaderSlices/RollOvers/ESARegistryR.gif','ESAHeaderSlices/RollOvers/ESANewDataSetR.gif','ESAHeaderSlices/RollOvers/ESASearchR.gif','ESAHeaderSlices/RollOvers/ESALoginR.gif');

Also available in: Unified diff