WHERE group_project_accesses.group_id = #{group.id}
AND projects.id = group_project_accesses.project_id
AND distributions.id = projects.distribution_id
+ AND distributions.status <> 'DEPRECATED'
ORDER BY projects.name")
project_list.each do |project|
FROM projects
, distributions
WHERE distributions.id = projects.distribution_id
+ AND distributions.status <> 'DEPRECATED'
ORDER BY projects.name")
project_list.each do |project|
FROM projects
, distributions
WHERE distributions.id = projects.distribution_id
+ AND distributions.status <> 'DEPRECATED'
ORDER BY projects.name")
doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 )
def queryDistribution
# get full distribution list
+ distribution_list = Distribution.find(:all, :conditions => ["status NOT IN ('DEPRECATED')"])
+
+ #generate to XML
+ doc = Builder::XmlMarkup.new( :target => out_string = "", :indent => 2 )
+ doc.Response {
+ generate_xml_header(doc)
+
+ doc.Data {
+ distribution_list.each do |distribution|
+ doc.Distribution {
+ doc.Id(distribution.id)
+ doc.Name(distribution.name)
+ }
+ end
+ }
+ }
+
+ #send_data
+ render :text => out_string, :content_type => "text/xml"
+ end
+
+ def queryAllDistribution
+ # get full distribution list
distribution_list = Distribution.find(:all)
#generate to XML
get "projects/queryDistribution"
+ get "projects/queryAllDistribution"
post "projects/binaryFileUpload"
# projects
<input id="login-form-save" type="checkbox" name="save" class="custom" data-mini="true" checked/>
<label for="login-form-save">Save</label>
</span>
- <span style="clear: both; float: left;">
+ <div style="clear: both; float: left;">
<label for="login-form-password">Password</label>
- </span>
- <span style="clear: both;">
+ </div>
+ <div style="clear: both;">
<input id="login-form-password" type="password" name="password"/>
- </span>
+ </div>
<br/>
<div data-role="controlgroup" data-type="horizontal" style="float: left;">
<a href="#" data-rel="back" data-role="button" data-mini="true" >Cancel</a>
<label for="adminDistributionAdd-status"> Distribution status </label>
<select id="adminDistributionAdd-status" name="status" >
<option value="OPEN" selected="selected">OPEN</option>
+ <option value="DEPRECATED">DEPRECATED</option>
<option value="CLOSE">CLOSE</option>
</select>
<br>
option = '<option value="CLOSE">CLOSE</option>';
}
$("#adminDistributionModify-status").append(option);
+
+ if(serverStatusText.toUpperCase() == "DEPRECATED") {
+ option = '<option value="DEPRECATED" selected="selected">DEPRECATED</option>';
+ } else {
+ option = '<option value="DEPRECATED">DEPRECATED</option>';
+ }
+ $("#adminDistributionModify-status").append(option);
$("#adminDistributionModify-status").selectmenu("refresh");
}
*/
function adminDistributionInit() {
- queryDistribution( function (xml) {
+ queryAllDistribution( function (xml) {
var oldDistId = $("#adminDistribution-distribution-select option:selected").val();
var find = false;
var distributionList = $(xml).find("Data").find("Distribution");
getInfoFromServer(url, successFunction);
}
+function queryAllDistribution(successFunction) {
+ var url = 'projects/queryAllDistribution';
+ getInfoFromServer(url, successFunction);
+}
+
// controller : projects
function buildProject(changeInfoList, successFunction) {
var url = 'projects/buildProject';