RDN-1155
1

Links to Items

Scott on 9/4/2015 5:49 PM

Scott on 10/25/2015 5:01 AM

%
(hrs)
Logged

0 (hrs)


 Description

We would like users to be able to save links for their league.  So if something is important to the league as a URL, we need to allow them to save such links in RDN.

You can use the Inventory Items to guide you through this upgrade.

  1. You will add a new menu item under the League -> League Menu called Links
  2. You will need to Add, Edit and View Links just like the inventory page.
  3. Each Link will have the following properties
    1. Link - > URL Text
    2. Created - > Date Time is was created.
    3. Notes - > Notes on the actual link which you will use the same editor in Inventory -> Edit.
    4. Is Removed -> This won't be shown, but just rather a table property for soft deletes.
  4. You will need to maintain the same database structure as the Inventory Item as well as the same namespace and naming convention.
    1. Each link will be owned by the league.
  5. The links will be shown in a list just as how the Inventory List page shows.
    1. You will be able to click on the link, which will bring you to the View Page.  
    2. You will be able to click on the POPOUT icon to actually go to the link. http://fortawesome.github.io/Font-Awesome/icon/external-link/
  6. Only League Secretaries and above can Edit links.
  7. Any user of the league can add links.
  8.  
Skip Navigation Links
 

Scott Sunday, September 27, 2015 4:51 PM #

Please do this code on the Model within the controller.  Not the view.

+ var linkURL = string.Empty; + if (Model.Link.IndexOf("http") > -1 || Model.Link.IndexOf("https") > -1) + { + linkURL = Model.Link; + }else{ + linkURL = "http://"+Model.Link; + }

You can remove this

+<script> + +</script>

Please do this on the controller, not on the view.

+@helper CheckLinkURL(string url) +{ + + if (url.IndexOf("http") > -1 || url.IndexOf("https") > -1) + { + <a target="_blank" href="@Url.Content(url)"> + <i class="fa fa-external-link"></i> + </a> + } + else + { + <a target="_blank" href="@Url.Content("http://"+url)"> + <i class="fa fa-external-link"></i> + </a> + } +}

 

Pradeep Sunday, September 27, 2015 11:46 AM #

Please review if any thing missing as you pointed out ... please confirm

 

Pradeep Sunday, September 27, 2015 11:38 AM #

One more things as you pointed for View Link Page , NOTE should be on the top of actuall comment so did the same but to make rich(good) UI, URL and NOTE has been made into a ROW.

 

Pradeep Sunday, September 27, 2015 11:33 AM #

Its required changes has been made as per given in following points. The point #2 into Edit Link Page was not sure what actually needed to be, here in this point your mean don;t need Note for edit if so please put your comment so that changes can be made accordingly.

 

Scott Saturday, September 26, 2015 8:41 PM #

I don't know if your fully understanding or reading what I am writing in my bullet points...

On the All Links Page

  1. When clicking on the actual link, it should bring me to the VIEW page.
  2. When clicking on the EXTERNAL link icon, it should open up a new tab and bring me to the registered link.  
    1. This click is NOT working, please fix it.

On the View Link Page

  1. The title of this page should be View Link. 
    1. Right now it displays the link as the title and this is wrong.
  2. The Notes section should just be a DIV tag.  Not the actual EDITOR.
  3. The LINK URL display text doesn't need to be there.
    1. Please remove it and just leave the link.
  4. When I click on the link, it doesn't work. It brings me to http//...  Its missing the COLON in HTTP.
  5. The Notes display text should be ON TOP of the actual notes.  
    1. It should NOT be on the left hand side of the notes.

The Edit Link Page

  1. The title of this page should be called Edit Link.
    1. Right now its the actual link, and thats wrong.
  2. There should be no description of this page.
 

Scott Thursday, September 24, 2015 9:19 PM #

Looks pretty good.  The following things need to look better.

View Links Page

  1. View and Edit buttons need to be on the left hand side of the link.
  2. The should be a SPACE between the button icons and the button text.  There is currently no space on any of these buttons.  Add/View/Edit/Delete
  3. If I click on the actual link on this page, it should go to the view link page.
  4. There should be a ICON on the left hand side of all the links with a button.  It should be the http://fortawesome.github.io/Font-Awesome/icon/external-link/ icon.
    1. When a user clicks on this button, it will open up a new tab and go to that link.

View Link Page

  1. The title of the page should just be called Link.
  2. The Panel-Body should show both the link and the notes.
    1. The link should have a icon on the left hand side.  When clicking either this icon or the link, it shall go to the actual link by opening up a new tab.
    2. The notes shall be displayed under the link just how it is shown on the Edit Page.

Edit Page

  1. The title shall be called Edit Link

Add New Link Page

  1. Title shall be called Add New Link

 

 

Scott Thursday, September 24, 2015 9:07 PM #

When checking if the user can edit a link, please use this Method.  MemberCache.IsSecretaryOrBetterOfLeague

 

No need for this method:

+ public static bool IsValidMemberForEditLink(Guid memId) + { + try + { + var cached = GetCache(memId, true); + if (cached.memberDisplay != null) + if (cached.memberDisplay.LeagueOwnersEnum.HasFlag(LeagueOwnersEnum.Manager) || cached.memberDisplay.LeagueOwnersEnum.HasFlag(LeagueOwnersEnum.Owner) || cached.memberDisplay.LeagueOwnersEnum.HasFlag(LeagueOwnersEnum.Treasurer)) + return true; + } + catch (Exception exception) + { + ErrorDatabaseManager.AddException(exception, exception.GetType()); + } + return false; + }

 

Pradeep Tuesday, September 15, 2015 12:34 PM #

Scott, Its changes has been checked in so please review the funtionlity for #6 and #7.

Thanks

Pradeep

 

Pradeep Sunday, September 13, 2015 5:40 AM #

okay, I will do in the suggested way for database migration but previously I did in the such a way as we have couple of contaxt the in configuration file only that contaxt which is needed to update goes to enable and other contaxts commented out. 

 

 

Scott Saturday, September 12, 2015 7:18 PM #

LinkDA should be called LinkManager.

Seperate the link into its own class and call it Link.

Link should have its own namespace.  Classes/League/Links

 

Scott Saturday, September 12, 2015 7:14 PM #

Please don't comment out the onfiguration.cs file contexts...

We have multiple contexts for a reason and thats how we migrate our database.  

Look at this link to migrated each context.

http://stackoverflow.com/a/13477276/7644


Powered by BugNET 1.6.339.0