* Presta.csproj: A first class

* AssemblyInfo.cs: initial commit

* NpgsqlCircleProvider.cs: circle members are now stored in bd upon
  their user's name

* InputCircle.cs: fixes the new CircleManager interface usage

* Yavsc.sln: Adds the `Presta` project

* CircleController.cs: * Authorize some Http methods
* Lists circles as circles

* style.css: Fixes the missing "hidden" css class

* AccountController.cs: using the new Circle provider interface

* BlogsController.cs: * using the new Circle provider interface
* do not test blog entry collections in order to group them by a
  unique user name or title, it's too bad,
instead, keep user's request id as guide to model and view.

* YavscHelpers.cs: Adds a Circle Html formatter

* Circles.aspx: List of circles is now given as a list of `Circle`
  objects

* instdbws.sql: fixes the db in order to store user names in circle
  member's records.

* BlogEntryCollection.cs: ConcernsAUniqueTitle and ConcernsAUniqueUser
  are now Obsoletes

* UUTBlogEntryCollection.cs: Drops a useless ctor

* CircleProvider.cs: The `CircleManager` now delivers the user's
  circle as a `Circle` object collection.
This commit is contained in:
Paul Schneider
2015-08-20 20:02:46 +02:00
parent 3fa55acf2e
commit bdbda2a21f
21 changed files with 324 additions and 84 deletions

View File

@ -154,15 +154,24 @@ namespace Yavsc.WebControls
}
var u = Membership.GetUser ();
if (u != null) {
foreach (Yavsc.Model.ListItem ci in CircleManager.DefaultProvider.List(u.UserName)) {
foreach (var ci in CircleManager.DefaultProvider.List(u.UserName)) {
foreach (SelectListItem sli in Value)
if (sli.Value == ci.Value) {
if (sli.Value == ci.Id.ToString()) {
writer.AddAttribute ("selected", null);
break;
}
writer.AddAttribute ("value", ci.Value );
writer.AddAttribute ("value", ci.Id.ToString() );
writer.RenderBeginTag ("option");
writer.Write (ci.Text);
writer.Write (ci.Title);
if (ci.Members.Length > 0) {
writer.RenderBeginTag ("br");
writer.RenderEndTag ();
writer.RenderBeginTag ("i");
writer.Write (ci.Members [0]);
for (int i=1; i<ci.Members.Length; i++)
writer.Write (", "+ci.Members [i]);
writer.RenderEndTag ();
}
writer.RenderEndTag ();
}
}