From 3376407a50e41737c32ae8623743dff99d88d0f4 Mon Sep 17 00:00:00 2001 From: David Paquette Date: Fri, 30 Jan 2015 19:07:02 -0500 Subject: [PATCH] Updated Edit Bug Form Using the bootstrap grid layout allows for better structure and a more appealing screen in general. Also applied some standard button styling and used glyphicons wherever possible. --- src/BugTracker.Web/btnet_base.css | 6 + src/BugTracker.Web/edit_bug.aspx | 409 +++++++++---------- src/BugTracker.Web/edit_bug.aspx.cs | 78 ++-- src/BugTracker.Web/edit_bug.aspx.designer.cs | 18 +- 4 files changed, 257 insertions(+), 254 deletions(-) diff --git a/src/BugTracker.Web/btnet_base.css b/src/BugTracker.Web/btnet_base.css index 95ef31b..0bffcdc 100644 --- a/src/BugTracker.Web/btnet_base.css +++ b/src/BugTracker.Web/btnet_base.css @@ -277,6 +277,12 @@ a.external-link { margin-bottom: 10px; } +#edit_bug_menu ul li a.btn { + width: 100%; + text-align: left; + max-width: 175px; +} + /* for flags */ .wht {margin: auto; display: block; width:40%; height:80%; border: 1px solid #cccccc;} .red {margin: auto; display: block; width:40%; height:80%; background: red; border: 1px solid red;} diff --git a/src/BugTracker.Web/edit_bug.aspx b/src/BugTracker.Web/edit_bug.aspx index 0469ee7..1c0bac3 100644 --- a/src/BugTracker.Web/edit_bug.aspx +++ b/src/BugTracker.Web/edit_bug.aspx @@ -35,250 +35,247 @@
- <% if (User.Identity.GetCanAddBugs() && id > 0) - { %> - -  add new <%=btnet.Util.get_setting("SingularBugLabel", "bug")%> -      - <% } %> - -   - -
-
-
-
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
-
-
-
-
+
- - <%=btnet.Util.get_setting("SingularBugLabel", "bug")%> - <% if (id == 0 || permission_level == btnet.Security.PermissionLevel.All) - { %> + +
"> + +
+ +
+ + + +
+ + + <%=btnet.Util.get_setting("SingularBugLabel", "bug")%> +
+
+
+ <% if (id == 0 || permission_level == btnet.Security.PermissionLevel.All) + { %> + + +
+
+ Presets use /  save +
-
- <% } %> + <% } %> - <% if (btnet.Util.get_setting("DisplayAnotherButtonInEditBugPage", "0") == "1") - { %> -
-   -   -
-
- -
- <% } %> + <% if (btnet.Util.get_setting("DisplayAnotherButtonInEditBugPage", "0") == "1") + { %> +
+   +   +
+
+ +
+ <% } %> -
- -
+
+ +
- - + + - + -

 

- +

 

+ +
-
- -
- -
- - -   tags + +
+ +
+ + +   tags +
-
- -
- -
- - - + +
+ +
+ + + +
-
-
- -
- - +
+ +
+ + +
-
-
- -
- - +
+ +
+ + +
-
-
- -
- - +
+ +
+ + +
-
-
- -
- - - +
+ +
+ + + +
-
-
- -
- - +
+ +
+ + +
-
- - <% if (btnet.Util.get_setting("ShowUserDefinedBugAttribute", "1") == "1") - { %> -
- -
- - - + <% if (btnet.Util.get_setting("ShowUserDefinedBugAttribute", "1") == "1") + { %> +
+ +
+ + + + +
-
- <% } %> - -
- -
- -

- <% - if (permission_level != PermissionLevel.ReadOnly) - { - Response.Write("Entering \"" - + btnet.Util.get_setting("BugLinkMarker", "bugid#") - + "999\" in comment creates link to id 999"); - } - %> -

- + <% } %> + +
+ +
+ +

+ <% + if (permission_level != PermissionLevel.ReadOnly) + { + Response.Write("Entering \"" + + btnet.Util.get_setting("BugLinkMarker", "bugid#") + + "999\" in comment creates link to id 999"); + } + %> +

+ +
-
-
-
-
-
-
-
-
-
+
+
+
+
+
- + +
-
- - - - - - - - - - - <% +
+ <% - display_project_specific_custom_fields(); + display_project_specific_custom_fields(); + %> +
+ + + + + + + + + + + + + + + + + + + + + + + <% + if (id != 0) + { + display_bug_relationships(); + } %> - - - - - - - - - - - - - - - - - - - - - - - - <% - if (id != 0) - { - display_bug_relationships(); - } - %> -
-
+ + +
+
- -
diff --git a/src/BugTracker.Web/edit_bug.aspx.cs b/src/BugTracker.Web/edit_bug.aspx.cs index 84d5eb8..42dcf1c 100644 --- a/src/BugTracker.Web/edit_bug.aspx.cs +++ b/src/BugTracker.Web/edit_bug.aspx.cs @@ -328,17 +328,17 @@ void prepare_a_bunch_of_links_for_update() if (permission_level == PermissionLevel.All) { - string clone_link = " create copy"; + string clone_link = " Create Copy"; clone.InnerHtml = clone_link; } if (permission_level != PermissionLevel.ReadOnly) { - string attachment_link = " add attachment"; + + ",600,300)\" title='Attach an image, document, or other file to this item'> Add Attachment"; attachment.InnerHtml = attachment_link; } else @@ -351,9 +351,9 @@ void prepare_a_bunch_of_links_for_update() { if (permission_level != PermissionLevel.ReadOnly) { - string send_email_link = " send email"; + + ")' title='Send an email about this item'> Send Email"; send_email.InnerHtml = send_email_link; } else @@ -369,9 +369,9 @@ void prepare_a_bunch_of_links_for_update() if (permission_level != PermissionLevel.ReadOnly) { - string subscribers_link = " subscribers"; + + "' title='View users who have subscribed to email notifications for this item'> Subscribers"; subscribers.InnerHtml = subscribers_link; } else @@ -386,9 +386,9 @@ void prepare_a_bunch_of_links_for_update() { relationship_cnt = (int)dr_bug["relationship_cnt"]; } - string relationships_link = " relationships(" + relationship_cnt + ")"; + + "' title='Create a relationship between this item and another item'> Relationships(" + relationship_cnt + ")"; relationships.InnerHtml = relationships_link; } else @@ -403,9 +403,9 @@ void prepare_a_bunch_of_links_for_update() { revision_cnt = (int)dr_bug["svn_revision_cnt"]; } - string svn_revisions_link = " svn revisions(" + revision_cnt + ")"; + + "' title='View Subversion svn_revisions related to this item'> Svn Revisions(" + revision_cnt + ")"; svn_revisions.InnerHtml = svn_revisions_link; } else @@ -420,9 +420,9 @@ void prepare_a_bunch_of_links_for_update() { revision_cnt = (int)dr_bug["git_commit_cnt"]; } - string git_commits_link = " git commits(" + revision_cnt + ")"; + + "' title='View git git_commits related to this item'> git Commits(" + revision_cnt + ")"; git_commits.InnerHtml = git_commits_link; } else @@ -437,9 +437,9 @@ void prepare_a_bunch_of_links_for_update() { revision_cnt = (int)dr_bug["hg_commit_cnt"]; } - string hg_revisions_link = " hg revisions(" + revision_cnt + ")"; + + "' title='View mercurial git_hg_revisions related to this item'> Hg Revisions(" + revision_cnt + ")"; hg_revisions.InnerHtml = hg_revisions_link; } else @@ -457,9 +457,9 @@ void prepare_a_bunch_of_links_for_update() { task_cnt = (int)dr_bug["task_cnt"]; } - string tasks_link = " tasks/time(" + task_cnt + ")"; + + "' title='View sub-tasks/time-tracking entries related to this item'> Tasks/Time(" + task_cnt + ")"; tasks.InnerHtml = tasks_link; } else @@ -475,9 +475,9 @@ void prepare_a_bunch_of_links_for_update() format_subcribe_cancel_link(); - print.InnerHtml = " print"; + + "' title='Display this item in a printer-friendly format'> Print"; // merge @@ -486,9 +486,9 @@ void prepare_a_bunch_of_links_for_update() if (User.IsInRole(BtnetRoles.Admin) || User.Identity.GetCanMergeBugs()) { - string merge_bug_link = " merge"; + + "' title='Merge this item and another item together'> Merge"; merge_bug.InnerHtml = merge_bug_link; } @@ -508,9 +508,9 @@ void prepare_a_bunch_of_links_for_update() if (User.IsInRole(BtnetRoles.Admin) || User.Identity.GetCanDeleteBugs()) { - string delete_bug_link = " delete"; + + "' title='Delete this item'> Delete"; delete_bug.InnerHtml = delete_bug_link; } @@ -1322,18 +1322,18 @@ void format_subcribe_cancel_link() else { - string subscription_link = " "; + + ")'> "; if (subscribed > 0) { - subscription_link += "stop notifications"; + subscription_link += "Stop Notifications"; } else { - subscription_link += "get notifications"; + subscription_link += "Get Notifications"; } subscriptions.InnerHtml = subscription_link; @@ -1679,36 +1679,36 @@ void format_prev_next_bug() } } - string prev_next_link = ""; - if (this_bug_found) { + string prev_next_link = "" + Convert.ToString(save_position_in_list) + " of " + Convert.ToString(dv_bugs.Count) diff --git a/src/BugTracker.Web/edit_bug.aspx.designer.cs b/src/BugTracker.Web/edit_bug.aspx.designer.cs index 8d8f7ef..9851940 100644 --- a/src/BugTracker.Web/edit_bug.aspx.designer.cs +++ b/src/BugTracker.Web/edit_bug.aspx.designer.cs @@ -12,15 +12,6 @@ namespace btnet { public partial class edit_bug { - /// - /// prev_next control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl prev_next; - /// /// clone control. /// @@ -156,6 +147,15 @@ public partial class edit_bug { /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl bugid; + /// + /// prev_next control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl prev_next; + /// /// custom_field_msg2 control. ///