所以这是我的问题,我正在尝试在搜索字段中包含一个设施,如果您选中一个复选框,则需要删除任何具有data-isletagreed == 3的项目。
@if (prop.isLetAgreed == 0)
{
<span class="LetAgreed">
<p>FOR SALE</p>
</span>
}
@if (prop.isLetAgreed == 3)
{
<span class="LetAgreed" style="left:20px;">
<p>NOW SOLD SSTC</p>
</span>
}
@if (prop.isLetAgreed == 2)
{
<span class="LetAgreed">
<p>NOW SOLD</p>
</span>
}
<div class="portfolio-hover">
<div class="portfolio-hover-content">
<i class="fa fa-eye fa-3x"></i>
</div>
</div>
<img src="@prop.photo" class="img-responsive" alt="">
</a>
<div class="portfolio-caption">
<h4>@Html.Raw(propertyNameNew)</h4>
<div class="property-features">
<span><i class="fa fa-gbp"></i> @prop.price </span>
<span><i class="fa fa-bed"></i> @prop.maxtenants</span>
</div>
</div>
</div>
}
}
}
这是我当前的搜索表单,我应该添加什么来使搜索按钮考虑到prop.isLetAgreed == 3以及是否选中了复选框。
<div class="row search-input-group">
<div class="col-md-6">
<div class="input-group">
<span style="min-width:150px" class="input-group-addon">Bedrooms</span>
<div class="dropdown searchRoomWebApi">
<button class="btn btn-default dropdown-toggle search-dropdownWebApi" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
<span class="txt">select</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu search-dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">select</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">1</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">2</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">3</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">4</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">5</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">6</a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-6">
<div class="input-group">
<span style="min-width:150px" class="input-group-addon">Maximum Price</span>
<div class="dropdown searchPriceWebApi">
<button class="btn btn-default dropdown-toggle search-dropdownWebApi" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
<span class="txt">select</span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu search-dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">select</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">£100000</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">£200000</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">£300000</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">£400000</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">£500000</a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-6 col-md-offset-3">
<a id="btnSearchPropertyWebApi" style="width:100%" href="#" class="btn btn-default">
<span class="glyphicon glyphicon-search"></span> <span class="txt">Search</span>
</a>
</div>
</div>