Commit 8ffb6126a9ccc329e8abc142fa7f0c03184c4f16

Authored by Dmitriy Zaporozhets
1 parent a76adfa4

slim comment form

app/assets/stylesheets/sections/notes.scss
... ... @@ -169,30 +169,38 @@ td .line_note_link {
169 169 margin: 0;
170 170 }
171 171  
172   - .file_upload {
173   - position: absolute;
174   - right:14px;
175   - top:7px;
176   - }
177   -
178 172 .note_advanced_opts {
179 173 h6 {
180 174 line-height: 32px;
181   - margin-right: 12px;
  175 + padding-right: 15px;
182 176 }
183 177 }
184 178  
185   - div.attachments {
  179 + .attachments {
186 180 position:relative;
187 181 width: 350px;
188 182 height: 50px;
189 183 overflow:hidden;
190 184 margin:0 0 5px !important;
191   - }
192   - .file_name {
193   - line-height:30px;
194   - width:240px;
195   - height:28px;
196   - overflow:hidden;
  185 +
  186 + .input_file {
  187 + .file_upload {
  188 + position: absolute;
  189 + right:14px;
  190 + top:7px;
  191 + }
  192 +
  193 + .file_name {
  194 + line-height:30px;
  195 + width:240px;
  196 + height:28px;
  197 + overflow:hidden;
  198 + }
  199 + .input-file {
  200 + width: 260px;
  201 + height: 41px;
  202 + float: right;
  203 + }
  204 + }
197 205 }
198 206 }
... ...
app/views/notes/_form.html.haml
... ... @@ -13,6 +13,8 @@
13 13 is enabled.
14 14  
15 15 .row.note_advanced_opts.hide
  16 + .span2
  17 + = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note"
16 18 .span4.notify_opts
17 19 %h6.left Notify via email:
18 20 = label_tag :notify do
... ... @@ -23,11 +25,12 @@
23 25 = label_tag :notify_author do
24 26 = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit"
25 27 %span Commit author
26   - .span8.attachments
  28 + .span6.attachments
27 29 %h6.left Attachment:
28 30 %span.file_name File name...
29   - %button.file_upload.btn.small Upload File
30   - .input= f.file_field :attachment, :class => "input-file"
  31 +
  32 + .input.input_file
  33 + %a.file_upload.btn.small Upload File
  34 + = f.file_field :attachment, :class => "input-file"
31 35 %span.hint Any file less than 10 MB
32 36  
33   - = f.submit 'Add Comment', :class => "btn primary submit_note", :id => "submit_note"
... ...