Ticket/unstable/263 new layout ready #114

Merged
merged 66 commits into from Nov 7, 2011

Projects

None yet

7 participants

edavis10 and others added some commits Jul 31, 2011
@edavis10 edavis10 Clear @extra_journal_attributes also after saving a Journal 68526f6
@edavis10 edavis10 Check for journal_user, then updated_by, and finally User.current whe…
…n creating Journals
bf13b0f
@tomzx tomzx Replaced french word "anonyme" with label_user_anonymous. aa6bf25
@tomzx tomzx Replace hardcoded string "diff" in Wiki#show and Repositories_Helper. 552cd8d
@edavis10 edavis10 [#547] Security audit 2c46411
@edavis10 edavis10 Merge branch 'stable' 8b99047
@edavis10 edavis10 Update Changelog for 2.1.1 46ba84e
@edavis10 edavis10 Bump version to 2.1.1 da9c4a1
@edavis10 edavis10 Merge branch 'release-v2.1.1' into stable 3dc373e
@edavis10 edavis10 Merge branch 'stable' eded447
@edavis10 edavis10 Merge branch 'stable' into unstable aed0a6d
@edavis10 edavis10 Merge remote-tracking branch 'tomzx/b551_hardcoded_french_string'
Conflicts:
	app/views/wiki/annotate.rhtml
	app/views/wiki/diff.rhtml
	app/views/wiki/show.rhtml
30e81be
@edavis10 edavis10 Merge remote-tracking branch 'tomzx/b552_hardcoded_english_string'
Conflicts:
	app/helpers/repositories_helper.rb
4d48a6b
@edavis10 edavis10 [#557] Fix link_to_month to not escape the HTML arrow characters a7ab39d
@peelman peelman Adding id attribute to modules field set on project form. b8d0aa0
@peelman peelman Adding check all links to new project form.
Makes bulk changes that much faster...
2bb19b3
@schmidt schmidt [#573] Being more explicit about search fields to make sure, that AR …
…joins all tables properly
962b35e
@jplang @schmidt jplang [#577] Avoid validating users when creating watcher relation
Taken from Redmine r5880
Committed by Jean Philippe Lang
5d7bc5c
@thegcat thegcat Merge pull request #97 from finnlabs/pulls/577/invalid-watcher-user-fix
Invalid watcher user error when adding an invalid user as watcher #577
9e12ded
@thegcat thegcat Fix issue pdf export #561
The pdf export tried to export the initial journal, which it shouldn't.
8f4439e
@meineerde meineerde [#275] Add requires_chiliproject. We now use the rubygems dependency …
…syntax.
1796fdd
@meineerde meineerde Move Redmine::VERSION to ChiliProject::VERSION and add a compatibilit…
…y interface
5300120
@meineerde meineerde [#275] Use ChiliProject::VERSION for new code eae5c9a
@thegcat thegcat Merge pull request #96 from finnlabs/pulls/573/fix_aas_in_wiki_content
[#573] acts_as_searchable definition in WikiPage may be insufficient and cause SQL errors
3d03a3e
@thegcat thegcat Rip faster_csv out of lib into the Gemfile. #517 0b57e93
@thegcat thegcat Merge pull request #100 from thegcat/feature/517-put_faster_csv_in_th…
…e_gemfile

Rip faster_csv out of lib into the Gemfile. #517
57ecf52
@thegcat thegcat So let's try to hit all "ruby 1.8"s the hard way. d8ce756
@thegcat thegcat This should fix it once and for all… #517
(Sorry for the commit-noise)
9dae76d
@thegcat thegcat Bump rails to 2.3.14 #584 ec4b42f
@thegcat @thegcat thegcat Make TabularFormBuilder behave with subforms #586 2753973
@thegcat thegcat Add deferred loading for plugins which's requirements aren't all met …
…yet #256
a24a24e
@meineerde meineerde Add missing i18n strings 7eeeaa7
@meineerde meineerde Fix trailing whitespace c57c598
@meineerde meineerde fastercsv is not in lib anymore but a dependency 35b69d2
@meineerde meineerde Add copyright header 139dedf
@meineerde meineerde Update changelog 50930de
@meineerde meineerde Extend copyright timespan to 2010-2011 49498f4
@meineerde meineerde Bump version to 2.2.0 9272876
@meineerde meineerde Merge branch 'release-v2.2.0' into stable 296de66
@meineerde meineerde Merge branch 'stable' into unstable 2a3e129
@thegcat thegcat Show the correct authors in wiki diff view.
#author doesn't show the author of the journal but of the journaled object.
225a158
@meineerde meineerde Update Russian localization.
Contributed by Igor Zubkov, extracted from Redmine.
b43bf18
@meineerde meineerde [#617] Include database gems for mingw (Ruby on Windows) 48796c9
@thegcat thegcat Add setting to set today as the start date for new issues. #355
Patch contributed by Bruno Medeiros on http://www.redmine.org/issues/2277
aac42af
@thegcat thegcat Allow to filter watchers by more than just "me". #566 b47a90b
@thegcat thegcat Merge pull request #93 from peelman/form-attribute-changes
Adding Check All / Uncheck All on New Project form. #644
0d306a8
@schmidt @meineerde schmidt [#633] WikiPages may have no author - but should have
Chili 1.x did not enforce the presence of an author for wiki pages, but Chili 2.x does. This migrations fails, if there are WikiPages or Versions without author. By updating the migration, we may ensure, that the erroneous pages are correctly updated.

Signed-off-by: Holger Just <h.just@finn.de>
3fd809f
@meineerde meineerde Merge remote-tracking branch 'refs/remotes/thegcat/feature/566-more_w…
…atchers_to_filter_by'
d467f79
@meineerde meineerde [#633] Fix mock of WikiContent::Version for Ruby 1.9 e7f69d4
@meineerde meineerde [#619] Restrict anonymous read access with Redmine.pm
Redmine.pm now also checks for public projects whether the anonymous
user has the browse_repository right for a read operation.
8fb8cd0
@meineerde meineerde Update locales for 2.3.0 release 2e10441
@meineerde meineerde Update changelog for 2.3.0 release 0912e0d
@meineerde meineerde Bump version to 2.3.0 9af56d0
@meineerde meineerde Merge branch 'release-v2.3.0' into stable 9bcf575
@meineerde meineerde Merge branch 'stable' 489566a
@meineerde meineerde Merge branch 'stable' into unstable c87738d
@schmidt schmidt Moving query related models into separate files
This should enable easier overwriting/reloading in plugins, since now the autoloader is able to find the models.
c1ecadb
@edavis10 edavis10 Merge remote-tracking branch 'finnlabs/pulls/653/move-query-models-in…
…to-separate-files' into unstable
061beb4
@edavis10 edavis10 Merge branch 'ticket/unstable/263-new-layout' into unstable e51f067
@edavis10 edavis10 [#263] Remove placeholder thumbnail images cce496b
@edavis10 edavis10 [#263] Remove dead context menu code f31f44f
@edavis10 edavis10 [#263] Remove Shane and Peter theme a2514ec
@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/context_menus/issues.html.erb
@@ -1,52 +1,59 @@
-<ul>
+<%# Added: classes to the li %>
+<%# Added: classes to the a %>
+<%# Added: div for submenu icons %>
+<%# Removed: icon-* on links %>
@thegcat
thegcat Nov 3, 2011 Member

Any reason to keep those comments here, or is it a merge artifact?

@edavis10
edavis10 Nov 3, 2011 Member

I"ll remove them.

They were from when this was a plugin to keep track of what changes I made. The lines in this file were too dense to rely on git for it alone.

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/context_menus/issues.html.erb
@@ -110,12 +123,14 @@
<li><%= context_menu_link l(:button_duplicate), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue},
:class => 'icon-duplicate', :disabled => !@can[:copy] %></li>
<% end %>
- <li><%= context_menu_link l(:button_copy), new_issue_move_path(:ids => @issues.collect(&:id), :copy_options => {:copy => 't'}),
- :class => 'icon-copy', :disabled => !@can[:move] %></li>
- <li><%= context_menu_link l(:button_move), new_issue_move_path(:ids => @issues.collect(&:id)),
- :class => 'icon-move', :disabled => !@can[:move] %></li>
- <li><%= context_menu_link l(:button_delete), {:controller => 'issues', :action => 'destroy', :ids => @issues.collect(&:id), :back_url => @back},
- :method => :post, :confirm => l(:text_issues_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %></li>
+
+ <li class="move"><%= context_menu_link l(:button_move), {:controller => 'issues', :action => 'move', :ids => @issues.collect(&:id)},
+ :class => 'context_item', :disabled => !@can[:move] %></li>
+ <%# All users can copy because the copy acton will check their permissions on the target project %>
@thegcat
thegcat Nov 3, 2011 Member

Again: Comments in templates?

@edavis10
edavis10 Nov 3, 2011 Member

I'll remove the comment.

Same reason as above (documentation while it was a plugin).

@thegcat thegcat commented on the diff Nov 3, 2011
app/views/issues/_action_menu.rhtml
<%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue}, :class => 'icon icon-time-add' %>
<%= watcher_link(@issue, User.current, {:class => 'watcher_link', :replace => ['#watchers', '.watcher_link']}) %>
<%= link_to_if_authorized l(:button_duplicate), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-duplicate' %>
<%= link_to_if_authorized l(:button_copy), {:controller => 'issue_moves', :action => 'new', :id => @issue, :copy_options => {:copy => 't'}}, :class => 'icon icon-copy' %>
<%= link_to_if_authorized l(:button_move), {:controller => 'issue_moves', :action => 'new', :id => @issue}, :class => 'icon icon-move' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => (@issue.leaf? ? l(:text_are_you_sure) : l(:text_are_you_sure_with_children)), :method => :post, :class => 'icon icon-del' %>
+<div class="update button-large">
@thegcat
thegcat Nov 3, 2011 Member

.button-large is not a semantic but a "design" class, shouldn't be solved like this.

@edavis10
edavis10 Nov 3, 2011 Member

I'll change it.

@edavis10
edavis10 Nov 6, 2011 Member

After thinking about it, 'button large' still sounds like the best fit. The HTML is saying there should be a large button here but isn't saying what that design should be.

I'm leaving this alone for now. If you have a better name we can change it later.

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/issues/_list.rhtml
@@ -12,7 +12,7 @@
<% end %>
</tr></thead>
<% previous_group = false %>
- <tbody>
+ <tbody id="issue-list-body">
@thegcat
thegcat Nov 3, 2011 Member

These 2 ids will cause problems if the partial is reused somewhere else and don't provide more info than already there (besides shorter selectors).

@edavis10
edavis10 Nov 3, 2011 Member

I'll change it.

@edavis10
edavis10 Nov 6, 2011 Member

Removed the issue-list-body and issue-header ids. I think they were added for a feature I removed (lightbox form for a new issue).

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/issues/_relations.rhtml
@@ -1,10 +1,12 @@
<div class="contextual">
-<% if authorize_for('issue_relations', 'new') %>
- <%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>
-<% end %>
</div>
@thegcat
thegcat Nov 3, 2011 Member

Any reason to keep the empty div.contextual? Also: Subtasks still have the "add" link on the right (in a div.contextual), that's very confusing.

Furthermore: Just having "Add" is probably not explicit enough, any ideas for a better text/link/icon. Maybe something similar to the "+" icon next to the categories/versions dropdown menus?

@edavis10
edavis10 Nov 3, 2011 Member

I'll have to see what would happen by removing it.

Subtasks should be changed too, the design was pre-subtasks.

@edavis10
edavis10 Nov 6, 2011 Member

Removing the contextual divs is fine. I also updated the subtasks "Add" link to match.

@thegcat thegcat commented on the diff Nov 3, 2011
app/views/layouts/base.rhtml
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
+<!--[if lte IE 6]><%= stylesheet_link_tag 'ie6', :media => 'all' %><![endif]-->
+<!--[if lte IE 7]><%= stylesheet_link_tag 'ie7', :media => 'all' %><![endif]-->
+<!--[if gte IE 8]><![endif]-->
+
+<%= javascript_include_tag 'jquery.1.3.2.min.js' %>
@thegcat
thegcat Nov 3, 2011 Member

Any reason preventing us from using a current jquery?

@edavis10
edavis10 Nov 3, 2011 Member

The design has been tested with this version only. I have an issue to upgrade to a newer version that I'll work on after this is merged.

@thegcat thegcat commented on the diff Nov 3, 2011
app/views/layouts/base.rhtml
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
+<!--[if lte IE 6]><%= stylesheet_link_tag 'ie6', :media => 'all' %><![endif]-->
+<!--[if lte IE 7]><%= stylesheet_link_tag 'ie7', :media => 'all' %><![endif]-->
+<!--[if gte IE 8]><![endif]-->
@thegcat
thegcat Nov 3, 2011 Member

Would it be OK for you change those to selectors on the body (body.ie6, body.ie7 for the css and something like <!--[if lte IE 6]><body class="ie ie6"><![endif]--> in the page? That way plugins could add specific ie rules in their css, and the extra (core) css files can be merged to the theme too.

@edavis10
edavis10 Nov 3, 2011 Member

That doesn't make sense to me. These are done so each version of IE gets only the files it needs. What you're proposing wouldn't work because:

  • the body element becomes a case statement (case when ie7 <body.ie7>; when ie6 <body.ie6>; else <body>)
  • non-IE browsers would skip over if-comments, so they wouldn't have a body at all
  • you can't put a default body outside of the if-comments because then ie would get two bodies

I'll have to see the code you are proposing if this isn't what you meant.

@meineerde
meineerde Nov 3, 2011 Member

This is how I use it on http://meine-er.de which produces correct syntax for all browsers:

<!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie ie8"> <![endif]-->
<!--[if IE 9 ]> <body class="ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body class='non-ie'> <!--<![endif]-->
@edavis10
edavis10 Nov 3, 2011 Member

No offensive but that looks horrible, especially the last case. And each of these needs to run through erb because our body looks like <body class="<%=h body_css_classes %>">.

@meineerde
meineerde Nov 3, 2011 Member

The text is inserted verbatim into the layout. The body_base_classes can be inserted into each of the optional body tags. So ERB has no additional overhead.

The upside is that it don't require to load an additional stylesheet which has to be maintained separately and thus looses locality. It would also break once we use the assets pipeline in Rails 3.1.

This exact approach is also taken by the HTML5 Boilerplate which I consider best practice. (Well, they updated it to set the classes on the <html> tag, but still...)

@edavis10
edavis10 Nov 3, 2011 Member

The text is inserted verbatim into the layout. The body_base_classes can be inserted into each of the optional body tags. So ERB has no additional overhead.

There is an overhead because erb would run 5 times and before it's sent to the browser. And then we would have to make sure to change the body tag 5 times if it changes.

<!--[if lt IE 7 ]> <body class="ie ie6 <%=h body_css_classes %>"> <![endif]-->
<!--[if IE 7 ]> <body class="ie ie7 <%=h body_css_classes %>"> <![endif]-->
<!--[if IE 8 ]> <body class="ie ie8 <%=h body_css_classes %>"> <![endif]-->
<!--[if IE 9 ]> <body class="ie ie9 <%=h body_css_classes %>"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body class='non-ie <%=h body_css_classes %>'> <!--<![endif]-->

The upside is that it don't require to load an additional stylesheet which has to be maintained separately and thus looses locality.

Loading an additional stylesheet isn't that much, especially once they are cached in the client cache.

It would also break once we use the assets pipeline in Rails 3.1.

That discussion should wait until we are on Rails 3.1 and using the assets pipeline.

This exact approach is also taken by the HTML5 Boilerplate which I consider best practice. (Well, they updated it to set the classes on the tag, but still...)

I don't consider that best practice yet. Including IE specific stylesheets has been the "best practice" for years now. If you look at our current layout that is what is done for IE6 support right now (using an inline stylesheet).

@thegcat thegcat commented on the diff Nov 3, 2011
app/views/layouts/base.rhtml
-<%= tag('div', {:id => 'main', :class => (has_content?(:sidebar) ? '' : 'nosidebar')}, true) %>
- <div id="sidebar">
+ </div>
+
+ <% main_menu = render_main_menu(@project) %>
+ <% if has_content?(:sidebar) || !main_menu.blank? %>
+ <% display_sidebar = true %>
+ <% else %>
+ <% display_sidebar = false %>
+ <% end %>
@thegcat
thegcat Nov 3, 2011 Member

This should probably go in a helper, it at all.

@edavis10
edavis10 Nov 3, 2011 Member

I was waiting to refactor this.

@thegcat thegcat commented on an outdated diff Nov 3, 2011
app/views/projects/index.rhtml
@@ -2,7 +2,7 @@
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
-<div class="contextual">
+<div id="project-links"class="contextual">
@thegcat
thegcat Nov 3, 2011 Member

(Misses a space)

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/projects/index.rhtml
@@ -11,6 +11,8 @@
<h2><%=l(:label_project_plural)%></h2>
+<%= textilizable Setting.welcome_text %>
@thegcat
thegcat Nov 3, 2011 Member

Misses a div.wiki around it to work. Did you plan to replace the welcome page with the project list, or why has this landed here?

@edavis10
edavis10 Nov 3, 2011 Member

I'll remove this.

It was intended as an introduction to the users but I think it's out of place.

@thegcat thegcat commented on the diff Nov 3, 2011
app/views/queries/_new_issue_button.html.erb
@@ -0,0 +1,5 @@
+<% if @project %>
+<div class="new-issue button-large">
@thegcat
thegcat Nov 3, 2011 Member

(see above comment about .button-large)

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
app/views/versions/index.html.erb
@@ -43,10 +43,6 @@
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
<% end %>
-<h3><%= l(:label_version_plural) %></h3>
-<% @versions.each do |version| %>
-<%= link_to format_version_name(version), "##{version.name}" %><br />
-<% end %>
@thegcat
thegcat Nov 3, 2011 Member

This should go into a submenu of the "Roadmap".

@edavis10
edavis10 Nov 3, 2011 Member

I'll revert this.

Submenus are a separate issue because some discussion needs to happen with them first.

@thegcat
Member
thegcat commented Nov 3, 2011

public/images/pencil.png.oxygen is probably a source file that shouldn't still be there.

@thegcat thegcat and 1 other commented on an outdated diff Nov 3, 2011
public/javascripts/DD_belatedPNG.min.js
@@ -0,0 +1,13 @@
+/**
+* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
@thegcat
thegcat Nov 3, 2011 Member

Is this used somewhere?

@edavis10
edavis10 Nov 3, 2011 Member

No, I thought I removed all of the references but I missed this one.

@thegcat thegcat commented on an outdated diff Nov 3, 2011
public/stylesheets/application.css
@@ -19,59 +19,69 @@ h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; bord
padding: 0px 0px 0px 0px;
white-space:nowrap;
}
-#top-menu a {color: #fff; margin-right: 8px; font-weight: bold;}
+#top-menu a {color: #444;; margin-right: 0px; font-weight: bold;}
@thegcat
thegcat Nov 3, 2011 Member

s/;;/;/

@thegcat thegcat commented on the diff Nov 3, 2011
app/helpers/application_helper.rb
+ when params[:controller] == 'projects' && params[:action] == 'changelog'
+ "reports"
+ when params[:controller] == 'issues' && ['calendar','gantt'].include?(params[:action])
+ "reports"
+ when params[:controller] == 'projects' && params[:action] == 'roadmap'
+ 'roadmap'
+ when params[:controller] == 'versions' && params[:action] == 'show'
+ 'roadmap'
+ when params[:controller] == 'projects' && params[:action] == 'settings'
+ 'settings'
+ when params[:controller] == 'contracts' || params[:controller] == 'deliverables'
+ 'contracts'
+ else
+ params[:controller]
+ end
+
@thegcat
thegcat Nov 3, 2011 Member

That should definitely not be here. The cleanest current way to achieve "exceptions" for which menu item to open/highlight probably is an extension of the Redmine::MenuManager::MenuController.menu_item.

@edavis10
edavis10 Nov 3, 2011 Member

Maybe but that is left in until we figure out submenus: https://www.chiliproject.org/issues/559#note-4.

@thegcat thegcat commented on the diff Nov 3, 2011
app/helpers/journals_helper.rb
@@ -26,24 +26,29 @@ module JournalsHelper
def render_journal(model, journal, options = {})
return "" if journal.initial?
- journal_content = render_journal_details(journal, :label_updated_time_by)
- journal_content += render_notes(model, journal, options) unless journal.notes.blank?
+ journal_content = render_journal_details(journal, :label_updated_time_by, model, options)
@thegcat
thegcat Nov 3, 2011 Member

We lose flexibility by including render_notes into render_journal_details. What about extracting the header string without the call to render_notes into a render_journal_header method, so that render_journal is render_journal_header; render_notes; render_jounral_details?

@edavis10
edavis10 Nov 3, 2011 Member

Maybe, see my global note below about refactoring.

@edavis10
Member
edavis10 commented Nov 3, 2011

I'm not sure if I made this clear yet.

This pull request is to get the first version of the redesign in place. Yes there might be visual bugs, yes there are places where we can refactor things to be cleaner. But if we block this pull request and wait until it's "perfect" then we might as well wait 12 months before the redesign is done.

Having something "good" now is 100x better than waiting months until it's "perfect". Especially since the next stage is already blocked and waiting (finn-design).

@edavis10 edavis10 merged commit 7bc11f8 into chiliproject:unstable Nov 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment